Using sp_trace_setfilter

  • Hi

    I need to use sp_trace_setfilter ,to filter Database Id in my trace .the code that i used is this :

    set @intfilter = 8

    exec sp_trace_setfilter @TraceID, 3, 1, 0, @intfilter

    set @intfilter = 9

    exec sp_trace_setfilter @TraceID, 3, 1, 0, @intfilter

    set @intfilter = 10

    exec sp_trace_setfilter @TraceID, 3, 1, 0, @intfilter

    It works in one trace script and in another, it doesn't . the only difference between 2 scripts is Events used.

    is anybody there to help me?

  • Normally, it should run based on the filter. Try running the trace under gui to see if it actually filters and then script it out.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply