Monday, August 26, 2013

How to Stop & Delete the Information about trace in SQL Server

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

No comments:

Post a Comment

  Redshift User          Administration 1.1         Add New Users   Amazon Redshift user accounts can only be created and dropped by a d...