Need you help on to find wait type

  • Hello All,
    Need your help on TSQL Script to  find which wait type is running currently on the SQL server DB instance.

    Thanks in advance!!

    Best Regards,
    DBA

    SQL server DBA

  • Database admin(DBA) - Wednesday, October 25, 2017 2:09 PM

    Hello All,
    Need your help on TSQL Script to  find which wait type is running currently on the SQL server DB instance.

    Thanks in advance!!

    Best Regards,
    DBA

    sys.dm_os_waiting_tasks is the DMV that shows the current waits. You can find a good query in this article:
    Updated sys.dm_os_waiting_tasks script to add query DOP

    Sue

  • There's a 99% chance that it's the "bad code present" wait type. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Database admin(DBA) - Wednesday, October 25, 2017 2:09 PM

    Hello All,
    Need your help on TSQL Script to  find which wait type is running currently on the SQL server DB instance.

    Thanks in advance!!

    Best Regards,
    DBA

    Download & install the most recent version of standalone SSMS. Read up on the new features. One of them is exactly what you seek and is pitched at exactly your level of expertise - it will leave you itching for more.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

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

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