Skip to content

Latest commit

 

History

History
49 lines (42 loc) · 3.18 KB

sys-database-automatic-tuning-options-transact-sql.md

File metadata and controls

49 lines (42 loc) · 3.18 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.database_automatic_tuning_options (Transact-SQL)
Learn how to view automatic tuning options on SQL Server or Azure SQL Database. See required permissions and view additional available resources.
danimir
danil
randolphwest
11/04/2022
sql
system-objects
reference
database_automatic_tuning_options_tsql
database_automatic_tuning_options
sys.database_automatic_tuning_options_tsql
sys.database_automatic_tuning_options
database_automatic_tuning_options catalog view
sys.database_automatic_tuning_options catalog view
TSQL
=azuresqldb-current||>=sql-server-2017||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.database_automatic_tuning_options (Transact-SQL)

[!INCLUDEsqlserver2017-asdb-asdbmi]

Returns the automatic tuning options for this database.

Column name Data type Description
name nvarchar(128) The name of the automatic tuning option. Refer to ALTER DATABASE SET AUTOMATIC_TUNING (Transact-SQL) for available options.
desired_state smallint Indicates the desired operation mode for automatic tuning option, explicitly set by user.
0 = OFF
1 = ON
2 = DEFAULT
desired_state_desc nvarchar(60) Textual description of the desired operation mode of automatic tuning option.
OFF
ON
DEFAULT
actual_state smallint Indicates the operation mode of automatic tuning option.
0 = OFF
1 = ON
actual_state_desc nvarchar(60) Textual description of the actual operation mode of automatic tuning option.
OFF
ON
reason smallint Indicates why actual and desired states are different.
2 = DISABLED
11 = QUERY_STORE_OFF
12 = QUERY_STORE_READ_ONLY
13 = NOT_SUPPORTED
reason_desc nvarchar(60) Textual description of the reason why actual and desired states are different.
DISABLED = Option is disabled by system
QUERY_STORE_OFF = Query Store is turned off
QUERY_STORE_READ_ONLY = Query Store is in read-only mode
NOT_SUPPORTED = Available only in [!INCLUDEssNoVersion] Enterprise edition

Permissions

Requires the VIEW DATABASE STATE permission.

See also