Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to remove audittrace files?


How to remove audittrace files?

Author
Message
zeo
zeo
SSC Rookie
SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)

Group: General Forum Members
Points: 38 Visits: 1
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





lucky-80472
lucky-80472
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1297 Visits: 842

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
zeo
zeo
SSC Rookie
SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)

Group: General Forum Members
Points: 38 Visits: 1

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?

 





GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47145 Visits: 44346

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


zeo
zeo
SSC Rookie
SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)

Group: General Forum Members
Points: 38 Visits: 1

but how would I do the following?

 

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





GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47145 Visits: 44346

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


shew
shew
SSC-Addicted
SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)SSC-Addicted (418 reputation)

Group: General Forum Members
Points: 418 Visits: 929
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?



omer_abdalla
omer_abdalla
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 21
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search