Skip to content

Latest commit

 

History

History
57 lines (51 loc) · 3.18 KB

File metadata and controls

57 lines (51 loc) · 3.18 KB
title sys.query_store_query_text (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
SYS.QUERY_STORE_QUERY_TEXT
QUERY_STORE_QUERY_TEXT
SYS.QUERY_STORE_QUERY_TEXT_TSQL
QUERY_STORE_QUERY_TEXT_TSQL
dev_langs
TSQL
helpviewer_keywords
sys.query_store_query_text catalog view
query_store_query_text catalog view
ms.assetid f7032fa0-7c16-4492-bb82-685806c63a8c
caps.latest.revision 9
author BYHAM
ms.author rickbyh
manager jhubbard

sys.query_store_query_text (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2016-asdb-xxxx-xxx_md]

Contains the [!INCLUDEtsql] text and the SQL handle of the query.

Column name Data type Description
query_text_id bigint Primary key.
query_sql_text nvarchar(max) SQL text of the query, as provided by the user. Includes whitespaces, hints and comments.
statement_sql_handle vabinary(64) SQL handle of the individual query.
is_part_of_encrypted_module bit Query text is a part of an encrypted module.
has_restricted_text bit Query text contains a password or other unmentionable words.

Permissions

Requires the VIEW DATABASE STATE permission.

See Also

sys.database_query_store_options (Transact-SQL)
sys.query_context_settings (Transact-SQL)
sys.query_store_plan (Transact-SQL)
sys.query_store_query (Transact-SQL)
sys.query_store_runtime_stats (Transact-SQL)
sys.query_store_wait_stats (Transact-SQL)
sys.query_store_runtime_stats_interval (Transact-SQL)
Monitoring Performance By Using the Query Store
Catalog Views (Transact-SQL)
Query Store Stored Procedures (Transact-SQL)
sys.fn_stmt_sql_handle_from_sql_stmt (Transact-SQL)