Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2016 (13.x) and later
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Contains the Transact-SQL 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. Comments and spaces before and after the query text are ignored. Comments and spaces inside text aren't ignored. |
statement_sql_handle |
varbinary(64) | SQL handle of the individual query. |
is_part_of_encrypted_module 1 |
bit | Query text is a part of an encrypted module. |
has_restricted_text 1 |
bit | Query text contains a password or other unmentionable words. |
1 Azure Synapse Analytics always returns zero (0
).
SQL Server 2019 (15.x) and previous versions require VIEW SERVER STATE
permission on the server.
SQL Server 2022 (16.x) and later versions require VIEW SERVER PERFORMANCE STATE
permission on the server.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today