DBA Tools:sp_who3

  • Comments posted to this topic are about the item DBA Tools: sp_who3[/url]

    Hi All,

    Just a note to let you know that the issue with the TAB characters has been resolved, so you can just copy and paste the script if you would like to use it.

    Thanks

  • can't compile this proc on SQL Server 2005 SP2, x64

    get error:

    Msg 102, Level 15, State 1, Procedure sp_who3, Line 49

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure sp_who3, Line 103

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure sp_who3, Line 105

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure sp_who3, Line 117

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure sp_who3, Line 229

    Incorrect syntax near '?'.

    if one wants it.. one will justify it.

  • Hi,

    It appears that the TAB character was replaced by a series of 4 question marks (????) in the script I submitted.

    I will contact SQL Server Central and this will be corrected shortly.

    Thank you

  • Works nice in SQL Server 2008 x64!

    It would be better if you add the IP info!

    Thanks for sharing 😎

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • I can get it to compile on SQL 2005 and 2008 on a couple IA64's and it runs ok using the DB param. If there's no DB matching the name it shows all processes. The Login name is a different story. I can get "<login> is not a valid login or you do not have permission." even when I'm looking for a legitimate login.

    Thanks,

    Ken

  • Hi,

    Thank you for using the script and posting the comments. Could you please use the same login parameter in sp_who2 and compare the output ?

    You should get the same results as the ones you get in sp_who3.

    The main use for sp_who3 resides in it's ability to display all users for a certain database or set of databases.

    Thanks

  • Yes, your sp_who3 returns the same info as sp_who2 using the login param. I see. You retained existing code for this param while adding your own for the DB param.

    Ken

  • Hi,

    Thank you very much for your comments and your suggestion.

    The stored procedure returns the HostName.

    Although it would be a simple exercise to get the IP address for the given HostName, it is beyond the scope of this stored procedure. I intended for the output to be in a familiar form for the DBA, as returned by sp_who2.

    The main use for this stored procedure is as a very fast tool to get the top processes using I/O resources.

    Thanks,

    Mircea

  • Nice script.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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