หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Applies to:
SQL Server
This article describes how to use stored procedures to create a filter that retrieves only the information you need on an event being traced.
Set a trace filter
If the trace is already running, execute
sp_trace_setstatusby specifying@status = 0to stop the trace.Execute
sp_trace_setfilterto 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_*) are strictly typed and don't support automatic data type conversion. If these parameters aren't called with the correct input parameter data types, as specified in the argument description, the stored procedure will return an error.