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 «««12345»»»

What, When, Where, How, Who2 Expand / Collapse
Author
Message
Posted Monday, June 14, 2010 6:45 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 4:09 PM
Points: 21,252, Visits: 14,960
dma-669038 (6/14/2010)
Very nice article Jason. I must try the code, it looks neat. I would also recommend to anyone Adam Machanic's sp_whoisactive, we use that extensively. Thanks.


Thanks.

Yes - he has a very efficient and much more robust proc than my little thing.




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 #937200
Posted Tuesday, June 15, 2010 5:03 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:50 AM
Points: 11,192, Visits: 11,098
5 stars from me. You obviously put a lot of work into this, and it shows.
Loved the screenshot from 6.5 - took me way back. Simpler times.




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #937384
Posted Tuesday, June 15, 2010 7:23 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 4:09 PM
Points: 21,252, Visits: 14,960
Paul White NZ (6/15/2010)
5 stars from me. You obviously put a lot of work into this, and it shows.
Loved the screenshot from 6.5 - took me way back. Simpler times.


Thanks. I thought the screenshot was the icing. It seemed the most convincing way to show the existence of who2 way back when.




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 #937479
Posted Tuesday, June 15, 2010 8:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 24, 2010 9:40 PM
Points: 6, Visits: 20
Jason

And I complain to my users when they do not give me enuff info!!

SQl Level is 9.0.4273
Post #937589
Posted Tuesday, June 15, 2010 9:58 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, February 6, 2013 7:16 AM
Points: 26, Visits: 431
Thanks, nice work. Just picking nits:

The final bit about this procedure involves the input parameters. I chose to use TinyInts for these fields to permit a value of 0, 1, or NULL. I catch this in the where clause using case statements.


That's a case for the data type bit (http://msdn.microsoft.com/en-us/library/ms177603(SQL.90).aspx). You can then use ISNULL or COALESCE when checking their values, that's shorter.

Also, calling the first parameter @ShowSystemProcesses might be more intuitive, as in that case both NULL and 0 would have the same meaning.
Post #937651
Posted Tuesday, June 15, 2010 11:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 24, 2014 8:59 AM
Points: 24, Visits: 333
It worked, but I got the message:

Msg 6841, Level 16, State 1, Line 7
FOR XML could not serialize the data for node 'processing-instruction(definition)' because it contains a character (0x0000) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image data type and use the BINARY BASE64 directive.


Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)


Cheers!
Post #937720
Posted Tuesday, June 15, 2010 11:53 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 4:09 PM
Points: 21,252, Visits: 14,960
John Cuthbertson (6/15/2010)
Jason

And I complain to my users when they do not give me enuff info!!



SQl Level is 9.0.4273


Thanks -




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 #937731
Posted Tuesday, June 15, 2010 11:58 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 4:09 PM
Points: 21,252, Visits: 14,960
Here is something that I found on the FOR XML issue that a few have mentioned:
http://www.sqlservercentral.com/Forums/Topic853088-149-1.aspx

It seems that it may be related to unicode characters.

I am curious, for those that have this issue, Adam Machanic has a proc that he listed in this thread already. Does his proc handle the FOR XML correctly for you?




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 #937736
Posted Thursday, June 17, 2010 5:10 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, June 26, 2014 3:29 PM
Points: 192, Visits: 130
Hi Jason:

It works very well for me. It is in prod now, after running on QA.
It almost covers everything I need to know, just one more:

Is it possible to get the called proc/func parameter value in the QueryText field?

Thanks a lot
David



Post #939302
Posted Thursday, June 17, 2010 7:25 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 24, 2010 9:40 PM
Points: 6, Visits: 20
jason

I isolated the problem thread and it displays Ok with Andrew's code.
<?query --
FETCH API_CURSOR000000000002BC4F
--?>
Post #939318
« Prev Topic | Next Topic »

Add to briefcase «««12345»»»

Permissions Expand / Collapse