Thursday 5 April 2012

Activity Monitor

Activity Monitor is a tool inside SSMS showing information about processes, waits, I/O resource performance and recent expensive queries. To start Activity Monitor right-click the server name and click Activity Monitor.

Activity Monitor can be used to kill processes that are not completing:
  1. View processes
  2. Filter the Task State to SUSPENDED
  3. Note the value in the Blocked By column - the SPID
  4. Filter the Task State to ALL
  5. Filter the Session ID to the value of the SPID
  6. Note the value in the Head Blocker column. A 1 indicates this is the cause of blockage
  7. Right-click the process and view the details. You’ll see the code causing the blockage
  8. Right-click the session and Kill process
  9. If the Task State column has no option to filter by SUSPENDED then all is well

N.B. There may be times when the Head Blocker passes from one process to the next (for instance if the problematic query was executed multiple times)

Further reading:  Activity Monitor explained

No comments:

Post a Comment