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 ««12

Possible to use tored proc to kill all queries running longer than 2 hours AND are blocking other queries Expand / Collapse
Author
Message
Posted Wednesday, May 8, 2013 8:37 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, December 12, 2014 10:09 AM
Points: 2,876, Visits: 5,201
GilaMonster (5/8/2013)
Can you be a bit clearer what you want?

Kill all the queries that have been running for 2 hours and have been blocking other queries for 2 hours?
Kill all the queries that have been running for 2 hours and have blocked some queries at some point in that 2 hour period?
Kill all the queries that have been running for 2 hours and are blocking other queries at the point that the query is checked?

Something else?


Kill all queries which has digit '2' in it ...
The ones which have no digit 'two' better to be killed too!

I guess, OP should consider Jeff Moden suggestion...





_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1450615
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse