Archive for August, 2013

Check what degree of parallelism (DOP) that a process is running under

August 8, 2013

count the number of records in the below dataset.

SELECT session_id,COUNT(*) FROM (
select DISTINCT session_id, scheduler_id
from sys.dm_os_tasks
where parent_task_address IS NOT NULL
AND session_id IS NOT NULL) a
GROUP BY session_id

Advertisements