Monday, April 24, 2017

How to get all SQL Server internal tasks

Use the below statement to get all SQL Server internal task details.

SELECT * FROM sys.dm_exec_sessions
WHERE is_user_process=0

The below statement too seems correct but it does not give all the internal tasks.

SELECT * FROM sys.dm_exec_requests
WHERE status='background'

No comments:

Post a Comment

Understanding Skewed Data in SQL Server

My latest article.  http://bit.ly/2qd4rtl Understanding Skewed Data in SQL Server bit.ly Introduction I re...