June 16, 2014 at 12:08 pm
I have a basic script to create a trace which works fine, but I would like to add filters. So I added the sp_trace_setfilter logic, which works fine for textdata column:
exec sp_trace_setfilter @traceid, 10, 0, 7, N'Set RowCount 0'
But not for LoginName column:
exec sp_trace_setfilter @traceid, 11, 0, 7, N'LoginName'
Has anyone else seen this/resolved this?
There is an exception to every rule, except this one...
June 16, 2014 at 5:29 pm
I think you need to set the trace event first:
EXEC sp_trace_setevent @TraceID, 13, 11, 1
EXEC sp_trace_setfilter @TraceID, 1, 11, 0, 0, N'joe';
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
June 17, 2014 at 12:01 pm
I should've mentioned that earlier, yes the sp_trace_setevent was a part of the script.
example:
exec sp_trace_setevent @TraceID, 12, 11, @on
exec sp_trace_setevent @TraceID, 10, 11, @on
There is an exception to every rule, except this one...
June 17, 2014 at 1:22 pm
Try to pass 1 (not equal) instead of 7 (not like)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply