Delete a Trace (Transact-SQL)
Applies to: SQL Server
This topic describes how to use stored procedures to delete a trace.
For an example of using trace stored procedures, see Create a Trace (Transact-SQL).
To delete a trace
Execute sp_trace_setstatus by specifying
@status = 0
to stop the trace.Execute sp_trace_setstatus by specifying
@status = 2
to close the trace and delete its information from the server.
Note
A trace must be stopped first before it can be closed.
See Also
sp_trace_setstatus (Transact-SQL)
System Stored Procedures (Transact-SQL)
SQL Server Profiler Stored Procedures (Transact-SQL)
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho