Monday, July 7, 2014
DMV query to find current executing command of a session
SELECT er.session_id,
er.status,
er.command,
er.cpu_time,
er.total_elapsed_time,
sqltext.TEXT
FROM sys.dm_exec_requests er
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
where er.session_id = -- Your Session ID here
Subscribe to:
Posts (Atom)