Home Forums SQL Server 2008 T-SQL (SS2K8) Possible to use tored proc to kill all queries running longer than 2 hours AND are blocking other queries RE: Possible to use tored proc to kill all queries running longer than 2 hours AND are blocking other queries

  • 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?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass