June 14, 2010 at 12:49 pm
Roy Ernest (6/14/2010)
Hey Jason,Good Job there. I already have this version running in QA right now. 🙂
Thanks Roy.
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
June 14, 2010 at 12:49 pm
Trey Staker (6/14/2010)
Nice article Jason! I haven't tested the code yet but can't wait to have a chance to do this. You did a really thorough job.
Thanks
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
June 14, 2010 at 1:57 pm
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.
June 14, 2010 at 2:41 pm
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.
For reference, the URL for that is: http://tinyurl.com/WhoIsActive
Seems the author of this article uses it too, since he has copied my XML technique (with no attribution, and not as well as I've done, I won't hesitate to add :-P)
--
Adam Machanic
whoisactive
June 14, 2010 at 6:43 pm
Adam Machanic (6/14/2010)
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.For reference, the URL for that is: http://tinyurl.com/WhoIsActive
Seems the author of this article uses it too, since he has copied my XML technique (with no attribution, and not as well as I've done, I won't hesitate to add :-P)
ermmm, nope didn't get it from WhoIsActive. However, I do like your code too. I guess I will have to look even closer at your proc.
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
June 14, 2010 at 6:45 pm
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, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 15, 2010 at 5:03 am
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
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
June 15, 2010 at 7:23 am
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, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 15, 2010 at 8:57 am
Jason
And I complain to my users when they do not give me enuff info!!
SQl Level is 9.0.4273
June 15, 2010 at 9:58 am
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.
June 15, 2010 at 11:29 am
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!
June 15, 2010 at 11:53 am
John Cuthbertson (6/15/2010)
JasonAnd 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, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 15, 2010 at 11:58 am
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, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 17, 2010 at 5:10 pm
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
June 17, 2010 at 7:25 pm
jason
I isolated the problem thread and it displays Ok with Andrew's code.
<?query --
FETCH API_CURSOR000000000002BC4F
--?>
Viewing 15 posts - 16 through 30 (of 51 total)
You must be logged in to reply to this topic. Login to reply