Stop SQL trace and deadlock trace for MSSQL Server Monitoring
Stop the MSSQL Applicare Agent and follow the below steps.
Step 1: Login into MSSQL Server with 'sa' or Applicare User. The user should have sysadmin permission.
Step 2: Select "New Query" and "master" database.
Step 3: To view the traces enter the below sql and click execute.
select * from sys.traces;
Step 4: For every MSSQL Server agent two traces will be running for Applicare.
- SQL data gather (Maximum 512 MB).
- Deadlock data gather (Maximum 10 MB).
Once it reaches its maximum size it will reset itself. So it will not go beyond their maximum limit.
Expand the path column. If it is a Applicare Trace then in the path column it will have the Applicare Home directory and at last it will end with SQLTraceProfiling.trc and SQLDeadlockTraceProfiling.trc.
Step 5: In the trace results note the 'id' value of the Applicare traces and execute the below two SQL's one by one.
sp_trace_setstatus @traceid , 0
sp_trace_setstatus @traceid , 2
Replace the @traceid with the id value of Applicare trace.
For Example from the above result
SQLDeadLockTraceProfiling.trc id is 2. So replacing the @traceid with 2 and executing the below queries one by one.
sp_trace_setstatus 2 , 0
sp_trace_setstatus 2 , 2
SQLTraceProfiling.trc id is 3. So replacing the @traceid with 3 and executing the below queries one by one.
sp_trace_setstatus 3 , 0
sp_trace_setstatus 3 , 2
Step 6: Now the traces will be stopped and removed from the SQL server. To verify that execute the below query and check. The Applicare trace entries should not be there in the result.
Step 7: Now go to the MSSQL Agent home directory and delete the two trace files. It will be inside <ApplicareAgentHomeDirectory>
Please sign in to leave a comment.
Comments
0 comments