spwho2 cleaned up script

  • Comments posted to this topic are about the item spwho2 cleaned up script

  • So what's this? Really cleaned up!txtPost_CommentEmoticon(':w00t:');

  • That's pretty cleaned up all right! Does it run on 2012?

  • cant see nothing, i am using firefox and all it shows is a big textbox for me to type in!!

  • As I said...really cleaned up...has nothing to show!!!

    So where's the new script and the example display?

  • Please put the script over there. I can see only a text box which is really cleaned up 😀


    Sujeet Singh

  • Really cleaned up script, nothing to view 😀

  • Well, it was there a few days ago... Here's the script:

    DECLARE @ErrorTable TABLE(SPID INT, STATUS nvarchar(30), LOGIN nvarchar(50), HOSTNAME nvarchar(50), BLKBY nvarchar(10), DBName nvarchar(100),

    COMMAND nvarchar(100), CPUTIME INT, DISKIO INT, LASTBATCH nvarchar(100), PROGRAMNAME nvarchar(100), SPID2 INT, REQUESTID INT)

    INSERT INTO @ErrorTable (SPID, STATUS, LOGIN, HOSTNAME, BLKBY, DBName, COMMAND, CPUTIME,

    DISKIO, LASTBATCH, PROGRAMNAME, SPID2, REQUESTID)

    EXEC sp_who2

    SELECT * FROM @ErrorTable WHERE STATUS NOT IN ('BACKGROUND','sleeping') AND SPID <> @@SPID

    Simply removes the Background and Sleepings records from the view. This allows me to track my active SPIDs a little easier.

  • Thanks Kennedy:-).


    Sujeet Singh

Viewing 9 posts - 1 through 8 (of 8 total)

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