PSSDIAG: Setting trace filters (Catch22 situation)

Dec 1, 2011 at 7:36 PM

I have a question about setting filters to PSSDIAG trace. I read the steps indicated in ( to add filter, but I am not sure if it is possible to accomplish it.

I start pssDiag trace and get the traceid to add filter using "sp_trace_setfilter" but by then the trace has already started so I get an error saying that "the trace must be stopped before I can add a filter". But if I stop pssdiag trace, then it says " trace found with the provided traceid".

In the article it says "Initialize PSSDIAG on the server Find out the Trace ID of...." how do I just initialize?.

Am I missing something? What do you mean by "Initialize PSSDIAG on the server ..." how do I do that.


Dec 5, 2011 at 1:45 PM

How are you stopping the trace? sp_trace_setstatus with status value of 2 will delete the trace definition. Have you tried it with the value 0 which will just stop the trace and then you can add the filter. After that you can start the trace back up again.

Dec 6, 2011 at 8:39 PM

Posted additional inform with steps here:

Dec 19, 2011 at 12:21 AM
Edited Dec 19, 2011 at 11:05 PM



That is a very useful article you have. I will certainly try it out and see if I can get it to work.



Dec 19, 2011 at 6:06 PM
Edited Dec 19, 2011 at 11:06 PM

Yes, indeed it works great.