Creating sp_who5, need advice

  • Check out the view, you can query it to accomplishes that.

  • I copy/pasted this directly into QA (SQL2000 sp3) and it will not compile. Errors as follows:

    Server: Msg 170, Level 15, State 1, Procedure sp_who5, Line 38

    Line 38: Incorrect syntax near 'MAX'.

    Server: Msg 170, Level 15, State 1, Procedure sp_who5, Line 110

    Line 110: Incorrect syntax near 'MAX'.

    Server: Msg 197, Level 15, State 1, Procedure sp_who5, Line 124

    EXECUTE cannot be used as a source when inserting into a table variable.

    I'm heading out the door as I write this. I'll try and look at this tomorrow to figure out what I'm missing.

    -- You can't be late until you show up.

  • tosscrosby (2/27/2008)


    I copy/pasted this directly into QA (SQL2000 sp3) and it will not compile. Errors as follows:

    Server: Msg 170, Level 15, State 1, Procedure sp_who5, Line 38

    Line 38: Incorrect syntax near 'MAX'.

    Server: Msg 170, Level 15, State 1, Procedure sp_who5, Line 110

    Line 110: Incorrect syntax near 'MAX'.

    Server: Msg 197, Level 15, State 1, Procedure sp_who5, Line 124

    EXECUTE cannot be used as a source when inserting into a table variable.

    I'm heading out the door as I write this. I'll try and look at this tomorrow to figure out what I'm missing.

    I'm assuming you're trying to run this on SQL Server 2000? This is not compatible with 2000.

  • My fault. I need to pay more attention to the forum I'm in!:blush:

    -- You can't be late until you show up.

  • hey nice script bro....

    it gives trn count, lock count and start time as extra information..

    but i have doubt it shows u all the sleeping procedures and commands in it..

    is there any way to get only active connection??

    like what we r getting in sp_who4 active...

  • This is very very old ... if you're interested in seenig my latest versions along with MANY other helper views/procs/functions/etc. check out http://www.SQLSlayer.com. We should have our first official release ready by end of month with proper documentation.

    Thanks

Viewing 6 posts - 16 through 20 (of 20 total)

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