Udostępnij przez


Przykład prostego pliku wejściowego XML (DTA)

Dotyczy:programu SQL Server

Skopiuj i wklej ten przykład prostego pliku wejściowego XML do użycia do dostrajania obciążeń do ulubionego edytora XML lub edytora tekstów. Następnie zastąp wartości określone dla elementów Server, Database, Schema, Table, Workload i TuningOptions dla określonej sesji dostrajania . Aby uzyskać więcej informacji na temat atrybutów i elementów podrzędnych, których można używać z tymi elementami, zobacz Dokumentację pliku wejściowego XML (Doradca dostrajania aparatu bazy danych). W poniższym przykładzie użyto tylko podzestawu dostępnych opcji atrybutu i elementów podrzędnych.

Kod

<?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>

Zobacz też

Uruchamianie i używanie narzędzia Database Engine Tuning Advisor
Informacje o pliku wejściowym XML (Database Engine Tuning Advisor)