Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DBA Tools:sp_who3 Expand / Collapse
Author
Message
Posted Thursday, April 1, 2010 7:22 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 3:11 AM
Points: 6, Visits: 219
Comments posted to this topic are about the item DBA Tools: sp_who3

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



Post #895429
Posted Tuesday, April 6, 2010 8:56 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, May 24, 2013 2:15 PM
Points: 36, Visits: 200
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.
Post #897610
Posted Tuesday, April 6, 2010 6:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 3:11 AM
Points: 6, Visits: 219
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



Post #898038
Posted Thursday, April 15, 2010 2:26 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 1:51 AM
Points: 1,260, Visits: 3,422
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/
Post #903839
Posted Thursday, April 15, 2010 2:10 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 12:26 PM
Points: 323, Visits: 1,464
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
Post #904371
Posted Thursday, April 15, 2010 9:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 3:11 AM
Points: 6, Visits: 219
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



Post #904543
Posted Friday, April 16, 2010 8:29 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 12:26 PM
Points: 323, Visits: 1,464
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
Post #904895
Posted Saturday, April 17, 2010 7:51 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 3:11 AM
Points: 6, Visits: 219
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



Post #905511
Posted Tuesday, May 4, 2010 6:28 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 5:20 PM
Points: 17,600, Visits: 15,462
Nice script.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #915762
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse