Skip to content

Instantly share code, notes, and snippets.

@emailrhoads
Created December 19, 2019 14:58
Show Gist options
  • Select an option

  • Save emailrhoads/60884d78443cb4bd79bc5eaa4bb41e99 to your computer and use it in GitHub Desktop.

Select an option

Save emailrhoads/60884d78443cb4bd79bc5eaa4bb41e99 to your computer and use it in GitHub Desktop.
[Active Queries] #msssql
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment