May 19, 2011 at 9:42 pm
Hi
How can I find and trace the specific stored procedure in particular database using profiler
May 19, 2011 at 10:23 pm
check Database Audit Specification
http://msdn.microsoft.com/en-us/library/cc280472.aspx
http://msdn.microsoft.com/en-us/library/cc280404.aspx
EVENT DATA()
http://msdn.microsoft.com/en-us/library/ms173781.aspx
http://msdn.microsoft.com/en-us/library/ms187909.aspx
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
May 20, 2011 at 12:55 am
Start Profiler
Open New Trace
On “Event Selection” tab leave selected
- Stored Procedure/RPC completed
- TSQL/SQL: BatchCompleted
Or anything else you are interested in monitoring
(I would probably initially leave only these two and unselect the rest)
Tick the box” Show all columns”
Click on “Column filters”
Select “Database Name” and in the right window expand ‘like’ and type in
‘%HereTypeYourDatabaseName%’
Further
Select “TextData” and expand ‘like’ and type in ‘%NameOfTheProcedureYouWantToMonitor%’
Hope this answers your question
May 20, 2011 at 6:37 am
Another option is to skip the trace entirely and pull the data from cache using dynamic management objects. Selecting from sys.dm_exec_query_stats will show you aggregate information about a query and you can combine it with other DMOs to get the query text, statements and execution plans, all through a TSQL statement. The only thing you can't get this way are the parameters passed to the query.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply