SQL Server profiler not filtering by TextData column filter

Tony_Henrich picture Tony_Henrich · Dec 25, 2014 · Viewed 13k times · Source

I have a stored procedure, let's call it 'MyStoredProc', which gets called every few seconds.

I want to filter it because it's cluttering the view.

The proc is called like exec sp_executesql N'Exec @Return = [dbo].[MyStoredProc]....

I already have two Not Like filters on TextData column which work fine for other texts. However this third one is not working. The calls are still showing.

I have entered different variations: %[MyStoredProc]% or %MyStoredProc% or MyStoredProc.

They don't work.
What's the proper syntax for this? Also can a TextData filter work on a variable name?

I am using Profiler 2014 targeting a 2012 engine.

Answer

itzik Paz picture itzik Paz · Dec 25, 2014

How Filtering String From profiler textData As you can see, you should put the procedure name (I recommend witout the schema name , dbo.) between the %% (without the Brackets)