Export (0) Print
Expand All

How to set a trace filter (Transact-SQL)

SQL Server 2000

How to set a trace filter (Transact-SQL)

To set a trace filter

  1. If the trace is already running, execute sp_trace_setstatus specifying @status = 0 to stop the trace.

  2. Execute sp_trace_setfilter to configure the type of information to retrieve for the event being traced.

    Important  Unlike regular stored procedures, parameters of all SQL Profiler stored procedures (sp_trace_xx) are strictly typed and do not support automatic data type conversion. If these parameters are not called with the correct input parameter data types, as specified in the argument description, the stored procedure will return an error.

See Also

Creating and Managing Traces and Templates

Limiting Traces

sp_trace_setfilter

sp_trace_setstatus

System Stored Procedures (SQL Profiler Procedures)

Show:
© 2014 Microsoft