Displays usage information.
Specifies the tuning time limit in minutes. dta uses the specified amount of time to tune the workload and generate a script with the recommended physical design changes. By default dta assumes a tuning time of 8 hours. Specifying 0allows unlimited tuning time. dta might finish tuning the entire workload before the time limit expires. However, to make sure that the entire workload is tuned, we recommend that you specify unlimited tuning time (-A 0).
Tunes workload and applies the recommendation without prompting you.
Specifies the maximum space in megabytes that can be consumed by the recommended index and partitioning. When multiple databases are tuned, recommendations for all databases are considered for the space calculation. By default, dta assumes the smaller of the following storage sizes:
Three times the current raw data size, which includes the total size of heaps and clustered indexes on tables in the database.
The free space on all attached disk drives plus the raw data size.
The default storage size does not include nonclustered indexes and indexed views.
Specifies the maximum number of columns in indexes that dta proposes. The maximum value depends on the version of SQL Server. The maximum value for SQL Server 2000 is 16, the maximum value for SQL Server 2005 and SQL Server 2008 is 1024. By default, this argument is set to 16.
Specifies the maximum number of key columns in indexes that dta proposes. The default value is 16, the maximum value allowed. This argument only applies to SQL Server 2005 and SQL Server 2008. dta also considers creating indexes with included columns. Indexes recommended with included columns may exceed the number of columns specified in this argument.
Specifies the name of each database that is to be tuned. The first database is the default database. You can specify multiple databases by separating the database names with commas, for example:
dta –D database_name1, database_name2...
Alternatively, you can specify multiple databases by using the –D argument for each database name, for example:
dta –D database_name1 -D database_name2... n
The -D argument is mandatory. If the -d argument has not been specified, dta initially connects to the database that is specified with the first USE database_name clause in the workload. If there is not explicit USE database_name clause in the workload, you must use the -d argument.
For example, if you have a workload that contains no explicit USE database_name clause, and you use the following dta command, a recommendation will not be generated:
dta -D db_name1, db_name2...
But if you use the same workload, and use the following dta command that uses the -d argument, a recommendation will be generated:
dta -D db_name1, db_name2 -d db_name1
Specifies the first database to which dta connects when tuning a workload. Only one database can be specified for this argument. For example:
dta -d adventureworks ...
If multiple database names are specified, then dta returns an error. The -d argument is optional.
If you are using an XML input file, you can specify the first database to which dta connects by using the DatabaseToConnect element that is located under the TuningOptions element. For more information, see XML Input File Reference (Database Engine Tuning Advisor).
If you are tuning only one database, the -d argument provides functionality that is similar to the -d argument in the sqlcmd utility, but it does not execute the USE database_name statement. For more information, see sqlcmd Utility.
Uses a trusted connection instead of requesting a password. Either the -E argument or the -U argument, which specifies a login ID, must be used.
Specifies the name of the table or file where dta records events that it could not tune. The table is created on the server where the tuning is performed.
If a table is used, specify its name in the format: [database_name].[owner_name].table_name. The following table shows the default values for each parameter:
database_name specified with the –D option
owner_name must be dbo. If any other value is specified, then dta execution fails and it returns an error.
If a file is used, specify .xml as its extension. For example, TuningLog.xml.
The dta utility does not delete the contents of user-specified tuning log tables if the session is deleted. When tuning very large workloads, we recommend that a table be specified for the tuning log. Since tuning large workloads can result in large tuning logs, the sessions can be deleted much faster when a table is used.
Permits dta to overwrite an existing output file. If an output file with the same name already exists and -F is not specified, dtareturns an error. You can use -F with -of, -or, or -ox.
Specifies what types of physical design structures dta should include in the recommendation. The following table lists and describes the values that can be specified for this argument. When no value is specified, dta uses the default -faIDX.
Indexes and indexed views. For information about which versions of SQL Server this tuning option is not supported, see Unsupported Tuning Options.
Indexed views only. For information about which versions of SQL Server this tuning option is not supported, see Unsupported Tuning Options.
Nonclustered indexes only.
Specifies that filtered indexes be considered for new recommendations. For more information, see Filtered Index Design Guidelines.
Specifies what existing physical design structures dta must retain when generating its recommendation. The following table lists and describes the values that can be specified for this argument:
No existing structures
All existing structures
All partition-aligned structures.
All clustered indexes on tables
All clustered and nonclustered indexes on tables
Specifies whether new physical design structures (indexes and indexed views) that dta proposes should be partitioned, and how they should be partitioned. The following table lists and describes the values that can be specified for this argument:
Full partitioning (choose to enhance performance)
Aligned partitioning only (choose to enhance manageability)
ALIGNED means that in the recommendation generated by dta every proposed index is partitioned in exactly the same way as the underlying table for which the index is defined. Nonclustered indexes on an indexed view are aligned with the indexed view. Only one value can be specified for this argument. The default is -fpNONE.
Specifies that dta only considers dropping existing physical design structures. No new physical design structures are considered. When this option is specified, dta evaluates the usefulness of existing physical design structures and recommends dropping seldom used structures. This argument takes no values. It cannot be used with the -fa, -fp, or -fk ALL arguments
Specifies a numerical identifier for the tuning session. If not specified, then dta generates an ID number. You can use this identifier to view information for existing tuning sessions. If you do not specify a value for -ID, then a session name must be specified with -s.
Specifies the path and name of the workload file to use as input for tuning. The file must be in one of these formats: .trc (SQL Server Profiler trace file), .sql (SQL file), or .log (SQL Server trace file). Either one workload file or one workload table must be specified.
Specifies the name of a table containing the workload trace for tuning. The name is specified in the format: [database_name].[owner_name].table_name.
The following table shows the default values for each:
database_name specified with –D option.
owner_name must be dbo. If any other value is specified, execution of dta fails and an error is returned. Also note that either one workload table or one workload file must be specified.
Specifies the name of the XML file containing dta input information. This must be a valid XML document conforming to DTASchema.xsd. Conflicting arguments specified from the command prompt for tuning options override the corresponding value in this XML 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 from the command prompt.
Specifies the minimum percentage of improvement that the recommended configuration must satisfy.
Specifies whether physical design structures are created online. The following table lists and describes the values you can specify for this argument:
No recommended physical design structures can be created online.
All recommended physical design structures can be created online.
Database Engine Tuning Advisor attempts to recommend physical design structures that can be created online when possible.
If indexes are created online, ONLINE = ON is appended to its object definition.
Specifies the number of events in the workload that dta should tune. If this argument is specified and the workload is a trace file that contains duration information, then dta tunes events in decreasing order of duration. This argument is useful to compare two configurations of physical design structures. To compare two configurations, specify the same number of events to be tuned for both configurations and then specify an unlimited tuning time for both also as follows:
dta -n number_of_events -A 0
In this case, it is important to specify an unlimited tuning time (-A 0). Otherwise, Database Engine Tuning Advisor assumes an 8 hour tuning time by default.
Specifies that dta writes the recommendation as a Transact-SQL script to the file name and destination specified.
You can use -F with this option. Make sure that the file name is unique, especially if you are also using -or and -ox.
Specifies that dta writes the recommendation to an output report in XML. If a file name is supplied, then the recommendations are written to that destination. Otherwise, dta uses the session name to generate the file name and writes it to the current directory.
You can use -F with this option. Make sure that the file name is unique, especially if you are also using -of and -ox.
Specifies that dta writes the recommendation as an XML file to the file name and destination supplied. Ensure that Database Engine Tuning Advisor has permissions to write to the destination directory.
You can use -F with this option. Make sure that the file name is unique, especially if you are also using -of and -or.
Specifies the password for the login ID. If this option is not used, dta prompts for a password.
Sets quiet mode. No information is written to the console, including progress and header information.
Specifies the list of analysis reports to generate. The following table lists the values that can be specified for this argument:
All analysis reports
Statement cost report
Event frequency report
Statement detail report
Statement-index relations report (current configuration)
Statement-index relations report (recommended configuration)
Statement cost range report
Index usage report (current configuration)
Index usage report (recommended configuration)
Index detail report (current configuration)
Index detail report (recommended configuration)
View-table relations report
Workload analysis report
Database access report
Table access report
Column access report
Specify multiple reports by separating the values with commas, for example:
... -rl EVT_FREQ, VIW_TAB, WKLD_ANL ...
- -Sserver_name[ \instance]
Specifies the name of the computer and instance of SQL Server to connect to. If no server_name is specified, dta connects to the default instance of SQL Server on the local computer. This option is required when connecting to a named instance or when executing dta from a remote computer on the network.
Specifies the name of the tuning session. This is required if -ID is not specified.
Specifies the name of a file containing a list of tables to be tuned. Each table listed within the file should begin on a new line. Table names should be qualified with three-part naming, for example, adventureworks.dbo.department. Optionally, to invoke the table-scaling feature, the name of an existing table can be followed by a number indicating the projected number of rows in the table. Database Engine Tuning Advisor takes into consideration the projected number of rows while tuning or evaluating statements in the workload that reference these tables. Note that there can be one or more spaces between the number_of_rows count and the table_name.
This is the file format for table_list_file:
This argument is an alternative to entering a table list at the command prompt (-Tl). Do not use a table list file (-Tf) if you are using -Tl. If both arguments are used, dta fails and returns an error.
If the -Tf and -Tl arguments are omitted, all user tables in the specified databases are considered for tuning.
Specifies at the command prompt a list of tables to be tuned. Place commas between table names to separate them. If only one database is specified with the -D argument, then table names do not need to be qualified with a database name. Otherwise, the fully qualified name in the format: database_name.schema_name.table_name is required for each table.
This argument is an alternative to using a table list file (-Tf). If both -Tl and -Tf are used, dta fails and returns an error.
Specifies the login ID used to connect to SQL Server.
Launches the Database Engine Tuning Advisor GUI. All parameters are treated as the initial settings for the user interface.
Starts tuning session and exits.