To get the information about what are all the traces running in SQL Server
--------------------------------------------------------------------------
SELECT * FROM ::fn_trace_getinfo(NULL)
To stop the trace on the sql server
------------------------------------
EXEC sp_trace_setstatus @traceid = <traceid> , @status = 0
Traceid--Corresponding trace id Need to stop
To close the trace and delete the information about trace in sql server
----------------------------------------------------------------------
EXEC sp_trace_setstatus @traceid = <traceid> , @status = 2
Traceid--Corresponding trace id Need to delete
--------------------------------------------------------------------------
SELECT * FROM ::fn_trace_getinfo(NULL)
To stop the trace on the sql server
------------------------------------
EXEC sp_trace_setstatus @traceid = <traceid> , @status = 0
Traceid--Corresponding trace id Need to stop
To close the trace and delete the information about trace in sql server
----------------------------------------------------------------------
EXEC sp_trace_setstatus @traceid = <traceid> , @status = 2
Traceid--Corresponding trace id Need to delete
No comments:
Post a Comment