Workload Element (DTA)

Workload Element (DTA)


Specifies the workload to be used for a tuning session.

...code removed...



Data type and length


Default value



Required once for each DTAInput element.

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.

One workload must be specified for each tuning session.

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.

<DTAXML ...>
...code removed here...
...code removed here...

Community Additions

© 2015 Microsoft