February 7, 2011 at 11:48 am
I have a SQL Server trace running, how can I disabeled it?
Thank you
February 7, 2011 at 12:00 pm
See this really good article to achieve what you want.
http://www.sqlservercentral.com/articles/Administration/howtousetraceflagsinsqlserver2000/1860/
:w00t:
February 7, 2011 at 12:11 pm
This should help you Find all the traces on the server, and builds the commands to stop/drop the trace as well...
avoid using the command to drop teh default trace(is_default = 1 column); that trace is very valuable.
/*--results
TraceStatus StopTraceCommand DropTraceCommand id moreColumns...
Running exec sp_trace_setstatus 1, 0 exec sp_trace_setstatus 1, 2 1 moreColumns...
*/
select
CASE
WHEN status = 1
THEN 'Running'
ELSE 'Stopped'
END AS TraceStatus,
'exec sp_trace_setstatus ' + convert(varchar,id) + ', 0' As StopTraceCommand,
'exec sp_trace_setstatus ' + convert(varchar,id) + ', 2' As DropTraceCommand,
* from sys.traces
Lowell
February 7, 2011 at 12:22 pm
Thank you
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply