Sql-server – SQL Server 2005 Sleep_Task Wait Type


I have recently encountered a wait type that I am unable to find much info for. I have a stored procedure that takes about 1.0 hour to run but when the connection in the activity monitor displays the Sleep_Task wait type the SP could run for days if I didn't kill it. It just sits there doing nothing.

Does anyone have any info on what this wait type is and why it occurs?



Best Solution

Hmm, I thought this was a deadlock, but BOL says:

Sleep_Task Occurs when a task sleeps while waiting for a generic event to occur.

Someone on SqlServerCentral posts:

They are always associated with a processID that has the status of suspended.

Are you using distributed transactions?

It seems to be a known issue in pre-SP2 SqlServer2005: