This project is read-only.

PSSDIAG: Setting trace filters (Catch22 situation)

Dec 1, 2011 at 8: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 2: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 9:39 PM

Posted additional inform with steps here:

Dec 19, 2011 at 1:21 AM
Edited Dec 20, 2011 at 12:05 AM



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 7:06 PM
Edited Dec 20, 2011 at 12:06 AM

Yes, indeed it works great.