Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Drops a trace event session.
DROP TRACE EVENT SESSION [ IF EXISTS ] session-name UNCONDITIONALLY [ ON SERVER ]
When UNCONDITIONALLY is specified, dropping an active session automatically stops the session before removing its definition. Otherwise, an error is returned.
Specify the ON SERVER clause to drop a trace event session that is recording trace events from all databases on the database server. If this clause is not specified, then the trace event session on the current database is deleted.
You must have the MANAGE ANY TRACE SESSION system privilege.
Not in the standard.
The following statement drops the trace event session named my_session:
DROP TRACE EVENT SESSION my_session;