September 2, 2008 at 10:30 am
Hi All,
I want to be able to monitor a single stored procedure via SQL Server Profiler, but I do not know where I would specifiy the SP.
background:
I have a production server for which a lot of insertion take place via a stored procedure.
There have been a few sporadic problems with some data not being inserted fully - the SP pops data into 10 different db tables - so I though I wanted to turn on the windows performance tool (to monitor mem/cpu/hd activity) and SQL Server Profiler tool to monitor when the SP was run and how long it takes, to give me an idea of where and when a problem may occur.
My problem is that I cannot seem to find where I can specify the name of the single SP.
Any pointers would be appreciated.
Thanks
TT
September 2, 2008 at 11:59 am
In the TextData column add a filter that reads like this:
Like '%yourSprocName%'
I recall trying this once and not being able to get it to work. Test it out first.
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 2, 2008 at 2:26 pm
A key point here is to make sure the events you are tracking include the TextData column. One way to get this working is to start a trace filtering on SPID and from that SPID (an already connected SSMS query window) execute your SP. Then save the trace to a file, re-open it and apply a filter on TextData until you get it right.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 3, 2008 at 1:49 am
Thanks guys.
I will have a play around with that today.
TT
January 7, 2009 at 9:03 pm
hai all..
i want to know, how to make sql profiler running daily?
thanks
January 8, 2009 at 3:13 am
sweetpea_3007 (1/7/2009)
hai all..i want to know, how to make sql profiler running daily?
thanks
You just need to script out your profiler session with all your chosen events, columns, filters and other settings and create a job to run that script daily, say as a stored procedure. It is best to run Profiler through script, especially if it needs to be run on a regular basis.
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
February 18, 2009 at 2:03 pm
If you still need Profiler (SQL 2000), to filter on specific stored procedures, enter as a filter on TextData, for example:
exec _getStuff%
No single quotes or anything else and it will work.
February 18, 2009 at 2:25 pm
Or filter by ObjectID:
use db_name;
select object_id('sprocName');
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
February 26, 2009 at 10:45 am
Is there a way to monitor more than one SPROC? In other words, can i monitor more objects..i have 9 SPROCS to be monitored..
February 26, 2009 at 11:53 am
Yes, in the filter you can more than one item. Matches are made using LIKE so multiple sprocs can be used.
February 26, 2009 at 12:10 pm
t berry (2/26/2009)
Yes, in the filter you can more than one item. Matches are made using LIKE so multiple sprocs can be used.
Interesting, I haven't tried that.
What would be the syntax?
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
February 26, 2009 at 12:14 pm
For syntax see my post for this topic on 18 Feb, 2009.
February 26, 2009 at 12:17 pm
t berry (2/18/2009)
If you still need Profiler (SQL 2000), to filter on specific stored procedures, enter as a filter on TextData, for example:exec _getStuff%
No single quotes or anything else and it will work.
How would it work for multiple stored procedures, that do not start with the same set of characters?
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
June 28, 2010 at 6:36 am
i would like to monitor a single store procedure and all the actions inside that store procedure!
setting TextData like '%MySP%' does not help 🙁
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply