Skip to content
 

Blocking Processes (lead blocker)

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Blocking Processes (lead blocker)”.

3 Comments

  1. Al says:

    shouldn’t the query be changed from
    “WHERE spid IN (SELECT blocked FROM master.dbo.sysprocesses)
    AND blocked = 0″
    to
    “WHERE spid IN (SELECT spid FROM master.dbo.sysprocesses)
    AND blocked != 0″

    ?

  2. Tom says:

    This is Kalen Delaney’s code.
    You might want to give her the credit.

    Calif DBA

    • Derek Dieter says:

      Tom,

      Thank you. I definitely would have had I known it was hers. Thing is, I found it in a training manual passed out to me in a class from Microsoft and found it was very efficient.

      There are certain DMV queries that I don’t know the originator of but in case she is the originator of any other queries, as you mention, I owe her a thanks so I will link to her site from my resources page.

      As an additional thanks I’d also like to mention that if anyone has not read any of her internals books, I highly recommend them as they have been completely essential to at least my own understanding of SQL Server.

      Kalen Delaney – SQL Server Internals

post a comment OR Post Your Question on our ASK! Community!