Workload Element (DTA)
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Specifies the workload to be used for a tuning session.
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 ...> <DTAInput> <Server> ...code removed here... </Server> <Workload> <Database> <Name>MyDatabase</Name> <Schema> <Name>MyDBOwner</Name> <Table> <Name>TuningTable001</Name> </Table> </Schema> </Database> </Workload> ...code removed here... </DTAInput> </DTAXML>