snippetsqlMinor
How can I use SQL Profiler to capture a single stored procedure
Viewed 0 times
storedcanhowsqlcaptureproceduresingleprofileruse
Problem
Using SQL Server SQL Profiler, which configuration can be used to monitor a single stored procedure? I'd like to capture all
I've tried the following in a new SQL Profiler trace:
Neither of above configurations capture my procedure. I've also tried to remove the procedure name with the following configs:
Above configs do not capture any procedures.
Finally, I tried to execute the same profile without any column filters and I can confirm that it captures all SQL queries sent to SQL Server.
I've considered a workaround of capturing ALL stored procedure execs and post-filtering to my sproc of interest, using SQL queries or Excel Power Query. However, the high frequency of sproc executions in the environment I want to model, make this unfeasible.
EXEC sprocName to include the parameter list. I'd like to capture this procedure so that I can load test it using realistic parameter data.I've tried the following in a new SQL Profiler trace:
Events Selection > Column Filters > Text Data > LIKE: 'exec sprocName%'
Events Selection > Column Filters > Text Data > LIKE: 'exec sprocName'Neither of above configurations capture my procedure. I've also tried to remove the procedure name with the following configs:
Events Selection > Column Filters > Text Data > LIKE: 'exec%'
Events Selection > Column Filters > Text Data > LIKE: 'exec'Above configs do not capture any procedures.
Finally, I tried to execute the same profile without any column filters and I can confirm that it captures all SQL queries sent to SQL Server.
I've considered a workaround of capturing ALL stored procedure execs and post-filtering to my sproc of interest, using SQL queries or Excel Power Query. However, the high frequency of sproc executions in the environment I want to model, make this unfeasible.
Solution
I would suggest to use
In your case, create a new session in Extended Events by selecting
Extended Events instead of Profiler as the Extended Events has less overhead and more events to capture compare to Profiler.In your case, create a new session in Extended Events by selecting
rpc_completed event. For detailed steps..Context
StackExchange Database Administrators Q#245274, answer score: 6
Revisions (0)
No revisions yet.