A workload is a set of Transact-SQL statements that execute against a database or databases that you want to tune. The Database Engine Tuning Advisor can use Transact-SQL scripts, trace files, and trace tables as workloads.

If you specify a workload in an XML input file and a workload on the command line with the dta tool, the workload specified on the command line will be used for tuning. All tuning options specified on the command line override those that are specified in an XML input file. The only exception is if a user-specified configuration is entered in the evaluate mode in the XML input file. For example, if a configuration is entered in the Configuration element of the XML input file and the EvaluateConfiguration element is also specified as one of the tuning options, the tuning options specified in the XML input file will override any tuning options entered at the command line.

The following code example specifies the MyDatabase.MyDBOwner.TuningTable001 trace table for the Workload element. The TuningTable001 was created by using the Tuning template with SQL Server Profiler and saving the trace output as a table.