Oksana_students
06-06-2012, 12:37
Здраствуйте!!! очень нужна помощь. есть тестовое задание на английском, нужен ответ с объяснениями. Помогите пожалуйста
7. To get performance tuning recommendations, you are using an Extensible Markup Language (XML) input file in conjunction with the dta command-line utility. In the current setup, the Transact-SQL (T-SQL) workload file and the XML input file are two separate files. You want to combine both files by using the inline workload feature of the XML input file.
Here is the current XML input file:
<?xml version="1.0" encoding="utf-16" ?>
<DTAXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/dta">
<DTAInput>
<Server>
<Name>MyServerName</Name>
<!-- To tune multiplate databases, list them and their associated tables in the following section. -->
<Database>
<Name>MyDatabaseName</Name>
<Schema>
<Name>MyDatabaseSchemaName</Name>
<!-- You can list as many tables as necessary in the following section. -->
<Table>
<Name>MyTableName1</Name>
</Table>
<Table>
<Name>MyTableName2</Name>
</Table>
</Schema>
</Database>
</Server>
<Workload>
<!-- The following element specifies a workload file, which can be a trace file or a Transact-SQL script file. -->
<File>c:\Test.sql</File>
</Workload>
<TuningOptions>
<TuningTimeInMin>60</TuningTimeInMin>
<FeatureSet>IDX_IV</FeatureSet>
<Partitioning>NONE</Partitioning>
<KeepExisting>NONE</KeepExisting>
<OnlineIndexOperation>OFF</OnlineIndexOperation>
</TuningOptions>
</DTAInput>
</DTAXML>
Here is the current workload file (Test.sql):
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
What changes should you make to the XML input file?
Ответы:
• Add one more tuning option, InLineWorkload, and set its value to True, as shown here:
<TuningOptions>
<TuningTimeImMin>60</TuningTimeInMin>
<FeatureSet>IDX_IV</FeatureSet>
<Partitioning>NONE</Partitioning>
<KeepExisting>NONE</KeepExisting>
<OnlineIndexOperation>OFF</ OnlineIndexOperation>
<InLineWorkload>True</InLineWorkload>
</TuningOptions>
• Add the following code at the of the line:
<EventString>
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
</EventString>
• * Change the Workload element to the following:
<Workload>
<EventString>
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
</EventString>
</Workload>
• Reference the same XML file element in the File element and add T-SQL code to the query and the end of the file
Если что есть перевод задания
7. To get performance tuning recommendations, you are using an Extensible Markup Language (XML) input file in conjunction with the dta command-line utility. In the current setup, the Transact-SQL (T-SQL) workload file and the XML input file are two separate files. You want to combine both files by using the inline workload feature of the XML input file.
Here is the current XML input file:
<?xml version="1.0" encoding="utf-16" ?>
<DTAXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/dta">
<DTAInput>
<Server>
<Name>MyServerName</Name>
<!-- To tune multiplate databases, list them and their associated tables in the following section. -->
<Database>
<Name>MyDatabaseName</Name>
<Schema>
<Name>MyDatabaseSchemaName</Name>
<!-- You can list as many tables as necessary in the following section. -->
<Table>
<Name>MyTableName1</Name>
</Table>
<Table>
<Name>MyTableName2</Name>
</Table>
</Schema>
</Database>
</Server>
<Workload>
<!-- The following element specifies a workload file, which can be a trace file or a Transact-SQL script file. -->
<File>c:\Test.sql</File>
</Workload>
<TuningOptions>
<TuningTimeInMin>60</TuningTimeInMin>
<FeatureSet>IDX_IV</FeatureSet>
<Partitioning>NONE</Partitioning>
<KeepExisting>NONE</KeepExisting>
<OnlineIndexOperation>OFF</OnlineIndexOperation>
</TuningOptions>
</DTAInput>
</DTAXML>
Here is the current workload file (Test.sql):
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
What changes should you make to the XML input file?
Ответы:
• Add one more tuning option, InLineWorkload, and set its value to True, as shown here:
<TuningOptions>
<TuningTimeImMin>60</TuningTimeInMin>
<FeatureSet>IDX_IV</FeatureSet>
<Partitioning>NONE</Partitioning>
<KeepExisting>NONE</KeepExisting>
<OnlineIndexOperation>OFF</ OnlineIndexOperation>
<InLineWorkload>True</InLineWorkload>
</TuningOptions>
• Add the following code at the of the line:
<EventString>
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
</EventString>
• * Change the Workload element to the following:
<Workload>
<EventString>
SELECT * FROM MyTableName2 WHERE
MyColumnName2 BETWEEN 2 AND 25000
ORDER BY ColumnName2
</EventString>
</Workload>
• Reference the same XML file element in the File element and add T-SQL code to the query and the end of the file
Если что есть перевод задания