Esempio di file di input XML semplice (DTA)Simple XML Input File Sample (DTA)

Copiare e incollare questo esempio di file di input XML semplice da utilizzare per l'ottimizzazione dei carichi di lavoro nell'editor XML o nell'editor di testo preferito.Copy and paste this sample of a simple XML input file to use for tuning workloads into your favorite XML editor or text editor. Sostituire quindi i valori specificati per gli elementi Server, Database, Schema, Table, Workloade TuningOptions con quelli per la sessione di ottimizzazione specifica.Then replace the values specified for the Server, Database, Schema, Table, Workload, and TuningOptions elements with those for your specific tuning session. Per altre informazioni sugli attributi e sugli elementi figlio che รจ possibile usare con questi elementi, vedere XML Input File Reference (Database Engine Tuning Advisor).For more information about the attributes and child elements that you can use with these elements, see the XML Input File Reference (Database Engine Tuning Advisor). Nell'esempio seguente viene utilizzato solo un subset delle opzioni relative agli attributi e agli elementi figlio disponibili.The following sample uses only a subset of available attribute and child element options.

CodiceCode

<?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:\PathToYourWorkloadFile</File>
    </Workload>
    <TuningOptions>
      <TuningTimeInMin>60</TuningTimeInMin>
      <FeatureSet>IDX_IV</FeatureSet>
      <Partitioning>NONE</Partitioning>
      <KeepExisting>NONE</KeepExisting>
      <OnlineIndexOperation>OFF</OnlineIndexOperation>
    </TuningOptions>
  </DTAInput>
</DTAXML>
<?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:\PathToYourWorkloadFile</File>
    </Workload>
    <TuningOptions>
      <TuningTimeInMin>60</TuningTimeInMin>
      <FeatureSet>IDX_IV</FeatureSet>
      <Partitioning>NONE</Partitioning>
      <KeepExisting>NONE</KeepExisting>
      <OnlineIndexOperation>OFF</OnlineIndexOperation>
    </TuningOptions>
  </DTAInput>
</DTAXML>

Vedere ancheSee Also

Start and Use the Database Engine Tuning Advisor Start and Use the Database Engine Tuning Advisor
Guida di riferimento ai file di input XML (Ottimizzazione guidata motore di database)XML Input File Reference (Database Engine Tuning Advisor)