select task_state,count(*) from sys.dm_os_tasks group by task_state
I ran the above statement on a SQL Server instance, and found it had about 633,000 records.
Our server version is 11.0.3000.
task_state
-------------- -----------
RUNNABLE 2
RUNNING 32
DONE 633115
SUSPENDED 99
How can I Close/Kill the useless tasks?
The MDW data collector have about 4000 page allocate in tempdb per time.
And this cause the IO pressure when server in busy time.
We do not want to restart our service.