Create a new Trace

In the “Events Selection” tab, click on “Column Filters”

In the TextData column add a filter:

Like

%uspMySP01%    

Note:

  • Make sure the TextData is checked.
  • Make sure you include your stored procedure name between %% because sometime the stored procedure name can be called with additional to other data.

TextData Examples:

declare @p1 dbo.MyUserTableType
insert into @p1 values(N'Test',N'',N'User1')
insert into @p1 values(N'Test',N'',N'User2')
exec dbo.uspMySP01 @tbMyTable=@p1
exec uspMyOtherSP02 
exec uspMy03 @ipv_biTableId=123
exec uspMySP04 @ipv_Param1=N'test',@ipv_Param2=136
exec sp_executesql N'EXECUTE [msdb].[dbo].[sp_sqlagent_update_jobactivity_requested_date] @session_id = @P1, @job_id = @P2, @is_system = @P3, @run_requested_source_id  = @P4',N'@P1 int,@P2 uniqueidentifier,@P3 int,@P4 int',4
Last modified: September 3, 2020

Author

Comments

Write a Reply or Comment