Cannot Delete Trace File

  • Hello all,

    I manually created a trace file to capture some deadlock events. I am now through working with the trace file and have set the trace status to 0 using "sp_trace_setstatus". No matter what I do I cannot delete the trace files that were generated. Everytime I attempt to delete the trace files, it says that the files are currently being used by another person or applications. I would appreciate any help deleting the files. I am guessing that if I stop sql server it will let me delete the files, however, I would rather not stop the machine as it needs to be up 24/7. Thank you in advance.

  • After stopping the trace try using

    sp_trace_setstatus traceid, 2

    This actually closes the trace.

  • Thank you Jackimo. Worked perfectly.

  • No problem at all - glad I could help.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply