Which view shows details about currently running queries in the data warehouse?

Prepare for the DP-700 Microsoft Fabric Data Engineer Exam with flashcards and multiple choice questions. Study with hints and explanations, and ensure success on your certification exam!

Multiple Choice

Which view shows details about currently running queries in the data warehouse?

Explanation:
The idea here is to identify which dynamic management view reports active work. The view that lists each request currently executing, along with its status and wait information, is sys.dm_exec_requests. It represents in-flight queries, so you can see what’s running right now, including details like which session is active and whether it’s waiting on a resource. If you want to see the exact SQL text being executed, you can cross-apply sys.dm_exec_sql_text using the sql_handle from each row. For example: SELECT r.session_id, r.status, t.text FROM sys.dm_exec_requests AS r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS t; Other views serve different purposes: sys.dm_exec_connections shows connections, sys.dm_exec_sessions shows session-level details, and sys.dm_exec_query_stats provides stats for queries that have completed or are cached. They don’t specifically reflect currently running queries, which is why sys.dm_exec_requests is the correct choice.

The idea here is to identify which dynamic management view reports active work. The view that lists each request currently executing, along with its status and wait information, is sys.dm_exec_requests. It represents in-flight queries, so you can see what’s running right now, including details like which session is active and whether it’s waiting on a resource. If you want to see the exact SQL text being executed, you can cross-apply sys.dm_exec_sql_text using the sql_handle from each row.

For example:

SELECT r.session_id, r.status, t.text

FROM sys.dm_exec_requests AS r

CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS t;

Other views serve different purposes: sys.dm_exec_connections shows connections, sys.dm_exec_sessions shows session-level details, and sys.dm_exec_query_stats provides stats for queries that have completed or are cached. They don’t specifically reflect currently running queries, which is why sys.dm_exec_requests is the correct choice.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy