Created
August 30, 2012 17:22
-
-
Save lionofdezert/3534159 to your computer and use it in GitHub Desktop.
Stop Auto Trace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @TraceID INT | |
SELECT TOP 1 @TraceID = id FROM sys.traces | |
WHERE path LIKE '%_AutoTrace%' | |
exec sp_trace_setstatus @TraceID, 0 --Stop trace | |
exec sp_trace_setstatus @TraceID, 2 --Close trace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment