Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 4.01 KB

sys-fn-trace-getfilterinfo-transact-sql.md

File metadata and controls

79 lines (61 loc) · 4.01 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.fn_trace_getfilterinfo (Transact-SQL)
sys.fn_trace_getfilterinfo (Transact-SQL)
rwestMSFT
randolphwest
06/10/2016
sql
system-objects
reference
fn_trace_getfilterinfo
fn_trace_getfilterinfo_TSQL
status information [SQL Server], filters
sys.fn_trace_getfilterinfo function
filters [SQL Server], traces
fn_trace_getfilterinfo function
TSQL

sys.fn_trace_getfilterinfo (Transact-SQL)

[!INCLUDE SQL Server]

Returns information about the filters applied to a specified trace.

Important

[!INCLUDEssNoteDepFutureAvoid] Use Extended Events instead.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

  
fn_trace_getfilterinfo ( trace_id )  

Arguments

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

Tables Returned

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

Column name Data type Description
columnid 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:

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
value sql_variant Specifies the value on which the filter is applied.

Remarks

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 any filter on that trace. If the specified trace does not have a filter, this function returns an empty rowset. When passed an invalid ID, this function returns an empty rowset. For similar information about traces, see sys.fn_trace_getinfo (Transact-SQL).

Permissions

Requires ALTER TRACE permission on the server.

Examples

The following example returns information about all filters on trace number 2.

SELECT * FROM fn_trace_getfilterinfo(2) ;  
GO  
  

See Also

Create a Trace (Transact-SQL)
sp_trace_setfilter (Transact-SQL)
sp_trace_create (Transact-SQL)
sp_trace_generateevent (Transact-SQL)
sp_trace_setevent (Transact-SQL)
sp_trace_setstatus (Transact-SQL)
sys.fn_trace_geteventinfo (Transact-SQL)
sys.fn_trace_getinfo (Transact-SQL)
sys.fn_trace_gettable (Transact-SQL)