Find Hung Jobs

  • How do we find jobs that are hung in SQL server?

  • If you want to check the jobs hung, you can just go to sql server agent and see the job activity monitor

    and see the status of hte job ( idle or executing)

    It may be normally executing based on the the time it takes, but if you know it execeded the usual run time, you can know its hung or waiting for some other processes to finsih.

    You can still go to managment --> activity monitor and see if there are specific blocking or not for any processes

    OR you can see the maximum wait time, wait type, CPU I/O operations for processes..You can get an idea if some process are slowing down.

    Btw, these are general areas where you can look up if you know some user experienced delay in his queries or something.

    In general, if some jobs hung up, the sql server will run slow or process will get stucked ,

    in that way you can get an idea and check the above measures.

    Regards,

    Skybvi

    Regards
    Sushant Kumar
    MCTS,MCP

  • Thanks for the information. Does SQL server stores the hung state in any of its tables?

  • No it doesn't but you can write the code your self by using sp_who2 and DMV's ('sys.dm_os_wait_stats').

    Regards,

    Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)

    http://basitaalishan.com
  • SQL_Surfer (2/17/2012)


    Thanks for the information. Does SQL server stores the hung state in any of its tables?

    See this :-

    http://www.mssqltips.com/sqlservertip/1949/sql-server-sysdmoswaitstats-dmv-queries/

    Regards,

    Skybvi

    Regards
    Sushant Kumar
    MCTS,MCP

Viewing 5 posts - 1 through 4 (of 4 total)

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