sys.dm_pdw_exec_requests (Transact-SQL)

APPLIES TO: noSQL Server noAzure SQL Database yesAzure Synapse Analytics (SQL DW) yesParallel Data Warehouse

Holds information about all requests currently or recently active in SQL Data Warehouse. It lists one row per request/query.

Column Name Data Type Description Range
request_id nvarchar(32) Key for this view. Unique numeric ID associated with the request. Unique across all requests in the system.
session_id nvarchar(32) Unique numeric ID associated with the session in which this query was run. See sys.dm_pdw_exec_sessions (Transact-SQL).
status nvarchar(32) Current status of the request. 'Running', 'Suspended', 'Completed', 'Canceled', 'Failed'.
submit_time datetime Time at which the request was submitted for execution. Valid datetime smaller or equal to the current time and start_time.
start_time datetime Time at which the request execution was started. NULL for queued requests; otherwise, valid datetime smaller or equal to current time.
end_compile_time datetime Time at which the engine completed compiling the request. NULL for requests that haven't been compiled yet; otherwise a valid datetime less than start_time and less than or equal to the current time.
end_time datetime Time at which the request execution completed, failed, or was canceled. Null for queued or active requests; otherwise, a valid datetime smaller or equal to current time.
total_elapsed_time int Time elapsed in execution since the request was started, in milliseconds. Between 0 and the difference between start_time and end_time.
If total_elapsed_time exceeds the maximum value for an integer, total_elapsed_time will continue to be the maximum value. This condition will generate the warning "The maximum value has been exceeded."

The maximum value in milliseconds is the same as 24.8 days.
label nvarchar(255) Optional label string associated with some SELECT query statements. Any string containing 'a-z','A-Z','0-9','_'.
error_id nvarchar(36) Unique ID of the error associated with the request, if any. See sys.dm_pdw_errors (Transact-SQL); set to NULL if no error occurred.
database_id int Identifier of database used by explicit context (for example, USE DB_X). See ID in sys.databases (Transact-SQL).
command nvarchar(4000) Holds the full text of the request as submitted by the user. Any valid query or request text. Queries that are longer than 4000 bytes are truncated.
resource_class nvarchar(20) The workload group used for this request. Static Resource Classes
staticrc10
staticrc20
staticrc30
staticrc40
staticrc50
staticrc60
staticrc70
staticrc80

Dynamic Resource Classes
SmallRC
MediumRC
LargeRC
XLargeRC
importance nvarchar(128) The Importance setting the request executed at. This is the relative importance of a request in this workload group and across workload groups for shared resources. Importance specified in the classifier overrides the workload group importance setting.
Applies to: Azure SQL Data Warehouse
NULL
low
below_normal
normal (default)
above_normal
high
group_name sysname For requests utilizing resources, group_name is the name of the workload group the request is running under. If the request does not utilize resources, group_name is null.
Applies to: Azure SQL Data Warehouse
classifier_name sysname For requests utilizing resources, The name of the classifier used for assigning resources and importance.
resource_allocation_percentage decimal(5,2) The percentage amount of resources allocated to the request.
Applies to: Azure SQL Data Warehouse
result_set_cache bit Details whether a completed query was a result cache hit (1) or not (0).
Applies to: Azure SQL Data Warehouse
0,1

For information about the maximum rows retained by this view, see the Metadata section in the Capacity limits topic.

Permissions

Requires VIEW SERVER STATE permission.

Security

sys.dm_pdw_exec_requests doesn't filter query results according to database-specific permissions. Logins with VIEW SERVER STATE permission can obtain results query results for all databases

Warning

An attacker can use sys.dm_pdw_exec_requests to retrieve information about specific database objects by simply having VIEW SERVER STATE permission and by not having database-specific permission.

See Also

SQL Data Warehouse and Parallel Data Warehouse Dynamic Management Views (Transact-SQL)