April 29, 2010
Delete Old CRM 4.0 Trace Files before running a New Trace
In my previous post, I pointed to the new hosted location of the CRM 4.0 Trace File utility.
The CRM Trace output is great because it produces very detailed information on what is happening on the server during a specific time.
One thing to note however is that the log files can become VERY large – and starting a new trace does not remove the log files from previously executed traces.
Additionally, the trace utility zips up everything in this directory each time, and if the directory contains old trace files, the actual file in question may be located among hundreds of older logs.)
To maintain the directory, you can manually delete the files from the server by opening Windows file explorer and navigating to the C:\Program Files\Microsoft CRM\Trace\ directory.
The file names follow a specific format:
(The actual directory used by the trace may be located elsewhere on your server. – You may need to search the drive to find the actual location for your environment.)
Files that are in use won’t be available to delete without a re-start, but deleting the older files should be sufficient.
A tip suggested by Steve Onufrock is to use a simple batch file to delete the older logs before initiating a new trace.
del /q DriveLetter:\Program Files\Microsoft CRM\Trace\*.log
[You’ll need to verify the location of the trace directory before implementing it – and please use this carefully, since you’re deleting files on the server, a small mistake could render your server unusable.]