Sleeping process

  • I have a SQL Server job running. One step has taken over 24 hours. Activity monitor says it is sleeping. The code that I believe is taking a long time is an Update of a table. The SPID that it says is blocking it is its own SPID. When I refresh the monitor the Physical IO changes (so it looks to me like it is doing something). Once is awhile the status will change to Runnable. Do I need to kill it?

  • tknight (2/10/2009)


    I have a SQL Server job running. One step has taken over 24 hours. Activity monitor says it is sleeping. The code that I believe is taking a long time is an Update of a table. The SPID that it says is blocking it is its own SPID. When I refresh the monitor the Physical IO changes (so it looks to me like it is doing something). Once is awhile the status will change to Runnable. Do I need to kill it?

    That's a judgement call. If you do kill it, it may take as long to rollback as it did to initially run (it may take longer).

    You might be able to see what it's status is by querying sys.dm_exec_requests and looking at the percent_complete column. It may not show anything, but it might.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I agree with Grant. If it's still working, and you can let it run, do so. If you need to get it finished, and perhaps just restart it, try killing it, but that can be slow, or even require a restart to completely kill it if it's truly stuck.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply