usp_who5

  • Ah! Sorry, misunderstood. In SSMS, go to Tools -> Options. From there, select Query Execution and you should see SET TEXTSIZE. I have it set to 2147483647. The new code (once approved by SSC.com) should automatically set this during execution. 🙂

  • The latest changes are now online!

  • Thx for sharing the code,,

    I am getting the below error

    Msg 535, Level 16, State 0, Line 10

    Difference of two datetime columns caused overflow at runtime.

  • Are you able to isolate the SPID throwing the error? If yes, are you able to identify the column in question?

  • now it works. seems it was one off issue.. but I will keep you posted.. thx and nice work ..

  • No problem. I seem to remember something about certain "date / time" columns in some of the system tables having ridiculous values (sometimes) for some reason which could be the issue (unfortunately I don't remember 100% what the details were behind that, could have been something I briefly scanned in an article on the net...). Let me know if it continues and you manage to track down the raw data value. With this I can write handling for it. 🙂

  • FYI: A few minor changes coming...

    Minor Code Formatting Changes / Bug Fixes And Changes To Date Calculation Methods

  • Very nice

    Cheers

  • Thank you! 🙂

  • The more I look at it the more I like it. This thing really does have everything you need in one place. I tested it on 2005, 2008 and 2012 and found no issues. Great work and thanks for taking the time to put this together.

    Cheers

  • Thank you, again! I really tried to make it a "one-stop" stored proc. 🙂

  • For anyone interested, I just submitted a new version of the proc (still awaiting approval from SQL Server Central though...).

    Additional output columns added:

    Batch_Pct: Percentage of the batch which has been processed

    Command_Pct: Percentage of work completed (applicable to a limited set of commands)

    Command_Time_Left: Time left before the command completes (DAYS HH:MM:SS)

    Command_Completion: Estimated completion time for the command

    Deadlock_Priority: Deadlock priority of the session

    Isolation_Level: Isolation level of the session

    Last_Row_Count: Row count produced by the last statement executed in the batch

    Lock_Details: Lock details of the session (in XML format)

    Lock_Timeout_Seconds: Lock timeout of the session

    Previous_Error: Previous error returned by the session

    Hope everyone likes the updates.

  • The new version's online. 🙂

  • You have created a great script! The info is exactly what is needed to pinpoint blockages. The format of your select statement also makes it extremely easy to re-arrange the output columns to put the values most important to me up front.

    I discovered that copy/paste from the web page converts periods to special characters in some places, but those were quickly cleaned up. You probably have no control over how the web page processes them during copy/paste anyway. Again, thanks for the great script!

    Roy Fulbright
    Computer Consultant

  • rfulbrig (11/3/2014)


    You have created a great script! The info is exactly what is needed to pinpoint blockages. The format of your select statement also makes it extremely easy to re-arrange the output columns to put the values most important to me up front.

    I discovered that copy/paste from the web page converts periods to special characters in some places, but those were quickly cleaned up. You probably have no control over how the web page processes them during copy/paste anyway. Again, thanks for the great script!

    Thank you very much, I am so glad it helped you. Just curious, what web browser are you using to copy / paste the script?

Viewing 15 posts - 16 through 30 (of 38 total)

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