Set a Trace Filter (Transact-SQL)
Applies to: SQL Server
This topic describes how to use stored procedures to create a filter that retrieves only the information you need on an event being traced.
To set a trace filter
If the trace is already running, execute sp_trace_setstatus by specifying
@status = 0
to stop the trace.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 Server 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
Filter a Trace
sp_trace_setfilter (Transact-SQL)
sp_trace_setstatus (Transact-SQL)
System Stored Procedures (Transact-SQL)
SQL Server Profiler Stored Procedures (Transact-SQL)
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin