Understanding sys.dm_os_tasks

Last Post 07 Jun 2011 02:04 PM by Martin_Smith. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

15 Feb 2009 08:40 PM
According to BOL dm_os_tasks returns one row for each task that is active in the instance of SQL Server. Why doesn't a corresponding session_id exists for each records? Some session_id's are NULL.

Thanks, Dave
New Member
New Member

07 Jun 2011 02:04 PM
Did you ever work this one out? I was just wondering the same thing and came across this post in a google search to try and find the answer.

It seems to me (though only based on a single query on one machine) that there are 2 groups of tasks which this occurs for. One has no associated worker_address and a task_state of "DONE" and the others all have associated workers and variable states shown.

Acceptable Use Policy