sys.dm_exec_requests
When we execute a query on the server, it is called a request. This DMV lists all the requests that are currently active on the server. Once a query completes and the results have been consumed by the client who made the request, it will no longer appear in this view, even if the session that generated it is still active. You can join this view to sys.dm_exec_sessions through the session_id column in order to obtain both information about the session, such as program_name, login_time, and so on, as well as information about the query execution, such as cpu_time, total_elapsed_time, logical_reads. This DMV displays information that is current for the moment in time at which it was queried, so the results returned will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access