Re: Problem using SP_TRACE_SETFILTER - it doesn't seem to apply th
From: Wanderer (Wanderer_at_discussions.microsoft.com)
Date: 01/03/05
- Next message: d6m7: "Login failed for user 'sa' over and over again"
- Previous message: William Wang[MSFT]: "RE: Client connection"
- In reply to: David Gugick: "Re: Problem using SP_TRACE_SETFILTER - it doesn't seem to apply th"
- Next in thread: Wanderer: "Re: Problem using SP_TRACE_SETFILTER - it doesn't seem to apply th"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 3 Jan 2005 00:15:01 -0800
Hi David, thanks for the response!
Thanks for the heads-up on not being able to see the traces! Learnt
something new, there. The problem is I am attempteing to Filter on duration >
1000, but seem to be getting everything. I really don't want to run in our
production environment and capture everything, I strongly suspect that I will
end up with GB's of tracefiles.
Regards the " SELECT * FROM ::fn_trace_getfilterinfo(1)", I also used:
SELECT * FROM ::fn_trace_getfilterinfo(@TraceId)
where @TraceId was the @TraceID variable used to assign the traces in the
SP, and is an output variable. And still got 0 rows returned.
Here is how I called the SP, and then checked the settings:
--Create trace, writing out to tracefile, until endtime
exec @Rc=Up_Auto_Profiler_Perf
@FileName,@RunStopTime,@MaxSize,@DurationFilter,@TraceID output
--Error Handling
select @rc
select @TraceID
SELECT * FROM ::fn_trace_getfilterinfo(1)
SELECT * FROM ::fn_trace_getfilterinfo(default)
SELECT * FROM ::fn_trace_getfilterinfo(@TraceID)
select * from ::fn_trace_getinfo(1)
select * from ::fn_trace_getinfo(default)
select * from ::fn_trace_getinfo(@TraceID)
The 3 ::fn_trace_getfilterinfo select ALL return 0 rows, whereas the 3
::fn_trace_getinfo ALL return data about the trace I had just created!
I stringly suspect that either I have somehow failed to exec the
SP_TRACE_SETFILTER (and when debugging it certainly didn't seem like a
problem), or it failed (and I do do fairly complete error checking, per the
error codes listed in the BOL), or else, for some reason, it is just not
being applied.
"David Gugick" wrote:
> Wanderer wrote:
> > Ok - so it seems that, for some reason, the sp_trace_setfilter is not
> > working. Going to try and build in some logic to catch and check why.
> > Anything that you can see from my SP, that points the way, I'd
> > appreciate hearing it.
> >
>
> You wouldn't see the filter in Profiler if you opened a TRC file after a
> server-side trace. All you see in Profiler is the events captured during
> the trace. The other information (filters) are not saved anywhere in the
> trace file.
>
> Also, I assume when you ran the following statement, you knew that the
> running trace had a handle of 1? It seems unlikely that the handle would
> be 1 unless you just cycled the server.
> SELECT * FROM ::fn_trace_getfilterinfo(1)
>
> I can't read your script file because of the wrapping. What events did
> you capture that are not showing the filter applied?
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
>
- Next message: d6m7: "Login failed for user 'sa' over and over again"
- Previous message: William Wang[MSFT]: "RE: Client connection"
- In reply to: David Gugick: "Re: Problem using SP_TRACE_SETFILTER - it doesn't seem to apply th"
- Next in thread: Wanderer: "Re: Problem using SP_TRACE_SETFILTER - it doesn't seem to apply th"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|