How to remove audittrace files?

  • I am seeing the following trace files be created every 6-8 minutes of about 200M each. What would create these files and how could I create a job to remove the old trace files?

    audittrace_20061029095619_4.trc

  • Hello,

    These files will be created by SQL Profiler. Please check "Process Info" under Current Activity and you might find a process dedicated for collecting audit trace information.

    Hope this helps.

    Thanks

     


    Lucky

  • Sorry that does not help.

    I really would like to know the following:

    1. How are the audittrace* files getting created? How would I configure to turn this feature on or off?

    2. How would I ceate a job to remove old trace files like on daily basis?

     

  • My guess is that you have c2 auditing switched on. Run sp_configure and have a look at the value of the c2 auditing option.

    If it is on, you will need to find out why (SOX compliency perhaps) and what is required to be done with the files. Here we have to run weekly reports on the contents of those files.

    You can disable it with sp_configure if it isn't needed.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • but how would I do the following?

     

    2. How would I ceate a job to remove old trace files like on daily basis?

  • Dunno. Depends on whether or not you need (business and complience requirement) to do a report on them first.

    If not, a SQL agent job, command line doing a delete would probably.

    Or perhaps a command line script. Neither is really my expertise.

    Here we zip and archive, so a job goes off once a day, zips all files and copies that zip to the archive server

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (10/31/2006)


    ...Here we zip and archive, so a job goes off once a day, zips all files and copies that zip to the archive server

    What do you use as the zip software? Is there a zip tool that gets installed by default by the Windows Server Operating System? (We are using Windows Server 2008.) I'd like to avoid purchasing/installing third party software because it opens Pandora's Box at my site for the security folks.

    Also, how do you handle open audittrace*.trc files? When I zip and delete (I am currently testing a convoluted script with PowerShell that I would like to replace), the delete fails when the file is open. Is there a way to force new .trc files without bouncing or failing over SQL Server?

  • I tried to create a maintenance plan to delete audit trace files that are older than 3 days from disk (were already backed up to tape). I used the wizard to setup a maintenance cleanup task to delete files of type "backup files" or "maintenance plan text reports" because there is no option for trace or other files. I selected "Search folder and delete files based on an extension" and used put "trc" in the extension field.

    The plan execute but it does not delete the files that match the criteria. Same plan worked before when it was set to delete files that are older than a week.

    Any clues as to why it is not deleting files now? I tried to run it both as a scheduled job and manually.

Viewing 8 posts - 1 through 7 (of 7 total)

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