sys.dm_pdw_sql_requests (Transact-SQL)

THIS TOPIC APPLIES TO: noSQL Server noAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Holds information about all SQL Server query distributions as part of a SQL step in the query.

Column Name Data Type Description Range
request_id nvarchar(32) Unique identifier of the query to which this SQL query distribution belongs.

request_id, step_index, and distribution_id form the key for this view.
See request_id in sys.dm_pdw_exec_requests (Transact-SQL).
step_index int Index of the query step this distribution is part of.

request_id, step_index, and distribution_id form the key for this view.
See step_index in sys.dm_pdw_request_steps (Transact-SQL).
pdw_node_id int Unique identifier of the node on which this query distribution is run. See node_id in sys.dm_pdw_nodes (Transact-SQL).
distribution_id int Unique identifier of the distribution on which this query distribution is run.

request_id, step_index, and distribution_id form the key for this view.
See distribution_id in sys.pdw_distributions (Transact-SQL). Set to -1 for requests that run at the node scope, not the distribution scope.
status nvarchar(32) Current status of the query distribution. Pending, Running, Failed, Cancelled, Complete, Aborted, CancelSubmitted
error_id nvarchar(36) Unique identifier of the error associated with this query distribution, if any. See error_id in sys.dm_pdw_errors (Transact-SQL). Set to NULL if no error occurred.
start_time datetime Time at which query distribution started execution. Smaller or equal to current time and greater or equal to start_time of the query step this query distribution belongs to
end_time datetime Time at which this query distribution completed execution, was cancelled, or failed. Greater or equal to start time, or set to NULL if the query distribution is ongoing or queued.
total_elapsed_time int Represents the time the query distribution has been running, in milliseconds. Greater or equal to 0. Equal to the delta of start_time and end_time for completed, failed, or cancelled query distributions.

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 equivalent to 24.8 days.
row_count bigint Number of rows changed or read by this query distribution. -1 for operations that do not change or return data, such as CREATE TABLE and DROP TABLE.
spid int Session id on the SQL Server instance running the query distribution.
command nvarchar(4000) Full text of command for this query distribution. Any valid query or request string.

For information about the maximum rows retained by this view, see the Maximum System View Values section in the Minimum and Maximum Values (SQL Server PDW) topic.

See Also

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