Automatic Deletion of Trace files from MSSQL server
2 years ago
Originally Published: 2014-11-19
Article Number
000066929
Applies To
RSA Security Analytics
Issue
The trace files are created on the MSSQL server might pile on the server which would cause the disk to be fully utilized causing the server to go down.
The files can be deleted automatically but it will be very un-productive to do so on a daily basis.
Resolution
For the automatically deletion of trace files on MSSQL database we have to change bit configuration in “sqlServerAudit<xxxx>.sql”.

Where "xxxx" which is encapsulated in the angular brackets represent the version of the MSSQL Server like 2005, 2008 etc

In the file sqlServerAudit<xxxx>.sql

Replace:
exec @rc = sp_trace_create @traceid output, 2, @filename, @maxfilesize, @endtime 

With

exec @rc = sp_trace_create @traceid output, 0, @filename, @maxfilesize, @endtime