• Very cool method to accomplish the task at hand, currently in SQL7 & 2000 I use a SQL Agent job to run a proc looking for blocking, if a block is found. I call & feed a file of commands to OSQL which pulls the lead blockers spid,then runs input buff & pss DBCC commands, next passes lead blockers spid to sp_lock1(modified version) all piped to a txt file, we then get some info from sysprocesses regarding are offender,  next enable dead lock traces - do a wait... disable the traces. Pages on this are as follows: sends a page to the db when blocking is first found, page to let dba know good error levels came back from trace being enbled, again page to ensure traces were disabled successfully.(Nice run on and on sentence, sorry) We then check pipe file and bingo there usually is the root cause all the objects involved. We gear the time of blocking to alarm on depending on how troublesome the server is and how often to even check for this type of condition.

     

    sqlscripters@hotmail.com