September 30, 2008 at 3:39 pm
I have tried through code and Profiler to monitor Extended Stored Procedure use and have not had any luck. When I goto execute either documented or undocumented sprocs, XP_(DLL) or SP_(BuiltIn), the trace doesn't pic up any execution.
8272, regular sprocs get picked up by profile, no trouble.
SQL Server 2005, latest patches(CUs) installed on fully updated Server 2003.
Help?
Al.
September 30, 2008 at 4:50 pm
If you monitor the SQL:StmtCompleted Trace Event, and add a filter for TextData LIKE '%sp_%' or TextData LIKE '%xp_%' it will trap them.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
September 30, 2008 at 5:31 pm
Same question also asked on MSDN Forums:
http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3944576&SiteID=1&mode=1
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
October 1, 2008 at 8:07 am
Thank you for the quick reply.
That solutions works for the most part, except the underscore in this case means "any single character" in the "LIKE". What it picks up is any sproc that has an SP in it.
I tried escaping the underscore, "\_" so the LIKE recognizes it as an underscore, but that didn't work.
Ideas?
Al
October 1, 2008 at 8:16 am
If you include the underscore within brackets, "%SP[_]", it will look for just that character.
See this section in the link from my previous post.
"Using Wildcard Characters as Literals"
October 1, 2008 at 9:23 am
My filter is now N'%exec%sp[_]%'
I was picking up any execution with SP_ in it.
example:
create table #tmp_sp_get_sqlagent_properties
Now I will pick up only system extended stored procedures in either the Master or MSDB database.
aL
October 1, 2008 at 9:44 am
Thanks for sharing that. I learned something new.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
October 1, 2008 at 3:11 pm
Small correction
It picks up System Stored Procedures, not just Extended SProcs. MSDB doesn't contain extended sprocs. It is picking those up as well, which is fine in my case.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply