Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Delete a Trace (Transact-SQL)
Collapse the table of content
Expand the table of content

How to: Delete a Trace (Transact-SQL)

This topic describes how to use stored procedures to delete a trace.

For an example of using trace stored procedures, see How to: Create a Trace (Transact-SQL).

To delete a trace

  1. Execute sp_trace_setstatus by specifying @status = 0 to stop the trace.

  2. Execute sp_trace_setstatus by specifying @status = 2 to close the trace and delete its information from the server.

NoteNote

A trace must be stopped first before it can be closed.

Community Additions

ADD
Show:
© 2015 Microsoft