Using the SQLCMD in SQL Server 2005

  • Comments posted to this topic are about the content posted at

    Kindest Regards,

    Andre Vigneau MCSE, MCDBA

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


  • all the links in the article are broke now.

  • Yes, links don't work any more. Any chance they can be restored?

    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply