fn_trace_getfilterinfo

Transact-SQL Reference

Transact-SQL Reference

fn_trace_getfilterinfo

Returns information about the filters applied to a specified trace.

Syntax

fn_trace_getfilterinfo( [ @traceid = ] trace_id )

Arguments

[ @traceid = ] trace_id

Is the ID of the trace. trace_id is int, with no default. The user employs this trace_id value to identify, modify, and control the trace.

Tables Returned

This function returns the following information. For more information about the columns, see sp_trace_setfilter.

Column name Data type Description
Column ID int The ID of the column on which the filter is applied.
Logical Operator int Specifies whether the AND or OR operator is applied.
Comparison Operator int Specifies the type of comparison made (=, <>, <, >, <=, >=, LIKE, or NOT LIKE).
Value sql_variant Specifies the value on which the filter is applied.
Remarks

fn_trace_getfilterinfo is a Microsoft® SQL Server™ 2000 built-in function that performs many of the actions previously executed by extended stored procedures available in earlier versions of SQL Server. Use fn_trace_getfilterinfo instead of the xp_trace_get*filter extended stored procedures. For more information, see Creating and Managing Traces and Templates.

To use fn_trace_getfilterinfo to obtain information about the filters applied or available for certain traces, execute a query that follows this form:

SELECT *
FROM ::fn_trace_getfilterinfo(trace_id)
WHERE

See Also

sp_trace_setfilter