April 1, 2010 at 7:22 pm
April 6, 2010 at 8:56 am
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.
April 6, 2010 at 6:23 pm
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
April 15, 2010 at 2:26 am
April 15, 2010 at 2:10 pm
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
April 15, 2010 at 9:55 pm
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
April 16, 2010 at 8:29 am
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
April 17, 2010 at 7:51 pm
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
May 4, 2010 at 6:28 pm
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