SELECT S.login_name,
S.host_name,
S.program_name,
WT.session_id,
WT.wait_duration,
WT.wait_type,
WT.blocking_session_id,
WT.resource_description,
FROM sys.dm_os_waiting_tasks AS WT
INNER JOIN sys.dm_exec_sessions AS S
ON WT.session_id - S.session_id
WHERE s.is_user_process = 1;
//filters out system sesssions returns sessions that are currently waiting on something
No comments:
Post a Comment