views:

24

answers:

2

Hi,

I am not a Db guy. But sometimes I am asked to check Db and see if there are some processes blocking the Db and if yes, KILL!

Can you explain me what is the best way of reading the Activity Monitor in terms of finding the right process candidates to be killed? What columns to be checked first and against what values?

thank you,

+1  A: 

I'm not sure why you would have to kill any process in SQL Server. SQL Server does a very good job of managing locks and if it really is necessary then SQL Server will choose a "deadlock victim" to kill. (Which is I think is partly based on which role the user belongs too)

I wouldn't have thought you are going to get any useful information that you can base who you are going to kill. And more often than not, by the time you have investigated the lock and chosen who to kill, the lock has probably been resolved.

I think you should really be looking in to why you are getting locks in the first place - not just killing random processes.

Barry
Here's one case where it's required: we have to use a 3rd party ODBC driver to query from SQL Server 2005 to a remote source. Very occasionally jobs using this will get 'stuck', locking out tables, and this requires a manual kill.
Yellowfog
+1  A: 

I'd start by looking at the blocked by column in activity monitor, this gives you the process id of the process which is causing the blocking. I'd then find the process and view the details to see exactly what the blocking process is doing

SPE109