Created
July 28, 2014 14:46
-
-
Save ghotz/d5e26e598dccfcbe13cf to your computer and use it in GitHub Desktop.
Get a breakdown of waiting tasks and sessions binding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
task_state | |
, SUM(CASE WHEN session_id IS NULL THEN 0 ELSE 1 END) AS tasks_session_bound | |
, SUM(CASE WHEN session_id IS NULL THEN 1 ELSE 0 END) AS tasks_session_unbound | |
, COUNT(*) AS total_tasks | |
FROM sys.dm_os_tasks | |
GROUP BY | |
task_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment