Sql-server – SQL Server 2005 Sleep_Task Wait Type

sql-server

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?

Thanks,

Chris
DBA

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:

http://social.msdn.microsoft.com/Forums/en-US/sqlnetfx/thread/942fe3d4-141a-486a-afdf-53f079d3a4d3