You can use the below script to get the query executing under session ID
SELECT session_id, command, database_id, user_id, text
FROM sys.dm_exec_requests AS r
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle)
where session_id = 133
SELECT session_id, command, database_id, user_id, text
FROM sys.dm_exec_requests AS r
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle)
where session_id = 133
No comments:
Post a Comment