fn_trace_getfilterinfo (Transact-SQL)
Collapse the table of content
Expand the table of content

fn_trace_getfilterinfo (Transact-SQL)

Returns information about the filters applied to a specified trace.

Topic link icon Transact-SQL Syntax Conventions

fn_trace_getfilterinfo ( trace_id )


Is the ID of the trace. trace_id is int, with no default.

Returns the following information. For more information about the columns, see sp_trace_setfilter (Transact-SQL).

Column name Data type Description

Column ID


The ID of the column on which the filter is applied.

Logical Operator


Specifies whether the AND or OR operator is applied.

Comparison Operator


Specifies the type of comparison made:

0 = Equal

1 = Not equal

2 = Greater than

3 = Less than

4 = Greater than or equal

5 = Less than or equal

6 = Like

7 = Not like



Specifies the value on which the filter is applied.

The user sets trace_id value to identify, modify, and control the trace. When passed the ID of a specific trace, fn_trace_getfilterinfo returns information about that trace. When passed a 0, NULL, or the string 'default', this function returns information about all active traces. When passed an invalid ID, this function returns an empty rowset.

Requires ALTER TRACE permission on the server.

Community Additions

© 2015 Microsoft