How to: Create XML Input Files

Updated: 5 December 2005

If you are an experienced XML developer, you can create XML-formatted files that Database Engine Tuning Advisor can use to tune workloads. To create these XML files, use your favorite XML tools to edit a sample file or to generate an instance from the Database Engine Tuning Advisor XML schema.

The Database Engine Tuning Advisor XML schema is available in your Microsoft SQL Server 2005 installation in the following location:

C:\Program Files\Microsoft SQL Server\90\Tools\Binn\schemas\sqlserver\2004\07\dta\dtaschema.xsd

The Database Engine Tuning Advisor XML schema is also available online at this Microsoft Web site.

This URL takes you to a page where many SQL Server XML schemas are available. Scroll down the page until you reach the row for Database Engine Tuning Advisor.

  1. Create a workload. You can use a trace file or table by using the tuning template in SQL Server Profiler, or create a Transact-SQL script that reproduces a representative workload for SQL Server. For more information, see How to: Create Workloads.

  2. Create an XML input file by one of the following methods:

    • Copy and paste one of the XML Input File Samples (DTA) into your favorite XML editor. Change the values to specify the appropriate arguments for your SQL Server installation, and save the XML file.
    • Using your favorite XML tool, generate an instance from the Database Engine Tuning Advisor XML schema.
  3. After creating the XML input file, use it as input to the dta command-line utility to tune the workload. For information about using XML input files with this utility, see How to: Tune a Database by Using the dta Utility.

If you want to use an inline workload, which is a workload that is specified directly in the XML input file, use the sample XML Input File Sample with Inline Workload (DTA).

For important information about the permissions required to use Database Engine Tuning Advisor, see Initializing Database Engine Tuning Advisor.

Community Additions