sys.dm_os_tasks

  • Hello everyone,

    some of the tasks from this dmv are appearing with session_id null which are connected with workers. Can someone explain me how task can be associated with worker without any session id  ??  

    SELECT dot.*
     FROM sys.dm_os_workers dow,
    sys.dm_os_tasks dot
    where dow.worker_address= dot.worker_address
    and dot.session_id is NULL

  • sudhakara - Friday, September 29, 2017 11:19 AM

    Hello everyone,

    some of the tasks from this dmv are appearing with session_id null which are connected with workers. Can someone explain me how task can be associated with worker without any session id  ??  

    SELECT dot.*
     FROM sys.dm_os_workers dow,
    sys.dm_os_tasks dot
    where dow.worker_address= dot.worker_address
    and dot.session_id is NULL

    System tasks don't necessarily have a session id.

    Sue

  • Sue_H - Friday, September 29, 2017 1:16 PM

    sudhakara - Friday, September 29, 2017 11:19 AM

    Hello everyone,

    some of the tasks from this dmv are appearing with session_id null which are connected with workers. Can someone explain me how task can be associated with worker without any session id  ??  

    SELECT dot.*
     FROM sys.dm_os_workers dow,
    sys.dm_os_tasks dot
    where dow.worker_address= dot.worker_address
    and dot.session_id is NULL

    System tasks don't necessarily have a session id.

    Sue

    Thank you for your input Sue.

    As session ids are already reserved till 50 for system related tasks then what kind system tasks are being performed here?

  • sudhakara - Monday, October 2, 2017 9:58 AM

    Thank you for your input Sue.

    As session ids are already reserved till 50 for system related tasks then what kind system tasks are being performed here?

    If you are not on SQL Server 2000 or less, Session ids less than 50 are not reserved for system tasks. And system tasks can be greater than 50 as well.

    Sue

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply