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)”.

5 Comments

  1. Anonymous says:

    I have pasted this and run. it shows 0 rows affected. Please help

  2. John P says:

    Absolutely love the code you have published! Thanks so much. Below is one change I made so that I could see the wait type description vs. the wait type code. Thanks again.

    changed this:
    ,waittype
    to this:
    ,er.wait_type

  3. 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″

    ?

  4. 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!