Step 1: Login into MSSQL Server with 'sa' or Applicare user. The user should have sysadmin permission and create and modify permission for SQL traces in "master" database.
Step 2: Select "master" database and select "New Query" and execute the below command.
Select * from sys.traces;
Step 3: Delete Trace
a. Stop the Agent from the task manager.
b. Stop the trace if it is already running.
sp_trace_setstatus @traceid , @status;
If it is a Applicare trace then in the path column it will have the Applicare Agent Home path and at last it will end with SQLTraceProfiling.trc and SQLDeadlockTraceProfiling.trc
Trace details
id - @traceID
status - @status
Status Conditions
0 - Stops the specified trace.
1 - Starts the specified trace.
2 - Closes the specified trace and deletes its definition from the server.
Path - Trace file created path
Modifies the current state of the specified trace
Replace the @traceid with correct id and @status with status condition and execute the above query
Let us consider @traceid - 2
Stop and delete Trace entry from server
sp_trace_setstatus 2 , 0;
sp_trace_setstatus 2 , 2
Step 4: Delete the trace files from the Agent Home directory.
Comments
0 comments
Article is closed for comments.