Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Blocked Process script for deadlock correction Expand / Collapse
Author
Message
Posted Sunday, September 23, 2007 2:27 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Thursday, July 3, 2014 2:36 PM
Points: 631, Visits: 236
Comments posted to this topic are about the item Blocked Process script for deadlock correction


Post #401522
Posted Friday, August 8, 2008 9:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 9, 2013 4:13 PM
Points: 1, Visits: 15
I don't understand how the last_batch for the blocker corresponds to someone waiting for a blocker. If you are getting the blocking spid record how is his last_batch value related to those being blocked?


-- get the blocking spid
SELECT @spid = spid, @hostname = hostname FROM master.dbo.sysprocesses
-- %%% Adjust > 120 to the number of seconds a processes has been blocked
-- before loging the data, notifying, and killing the Blocking process
WHERE blocked = 0 AND (convert(money,getdate()-last_batch)* 86400.0) > 120
Post #549353
Posted Thursday, February 26, 2009 7:46 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 7:37 AM
Points: 945, Visits: 266
I need to implement something like this soon. This article is a few years old so I'm wondering if there are other ideas out there. If not, is there a newer version of this script?
Many thanks.
Post #665023
Posted Wednesday, February 15, 2012 9:29 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 7:39 AM
Points: 321, Visits: 1,294
You can find here the newer one

http://www.sqlservercentral.com/scripts/sp_who2/72823/


Aim to inspire rather than to teach.
SQL Server DBA
Post #1252544
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse