簡單 XML 輸入檔範例 (DTA)
請複製用來微調工作負載的這個簡單 XML 輸入檔範例,再將它貼到您喜愛的 XML 編輯器或文字編輯器中。之後,請利用您的特定微調工作階段的各個值來取代指定給 Server、Database、Schema、Table、Workload 和 TuningOptions 等元素的值。如需有關可以搭配這些元素來使用的屬性和子元素的詳細資訊,請參閱<XML 輸入檔參考 (Database Engine Tuning Advisor)>。下列範例只用到部份可用的屬性及子元素選項。
程式碼
<?xml version="1.0" encoding="utf-16" ?>
<DTAXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://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:\PathToYourWorkloadFile</File>
</Workload>
<TuningOptions>
<TuningTimeInMin>60</TuningTimeInMin>
<FeatureSet>IDX_IV</FeatureSet>
<Partitioning>NONE</Partitioning>
<KeepExisting>NONE</KeepExisting>
<OnlineIndexOperation>OFF</OnlineIndexOperation>
</TuningOptions>
</DTAInput>
</DTAXML>