question

rptoshniwal avatar image
rptoshniwal asked

Audit File Size

Hello Everyone, I have a question about SQL Server Audit Files (.trc) For one of my database I have configured Audit setup, but now the issue is that these audit files are increasing up to 1.5 GB per day. As per my requirements I have to keep these audit files to give to my client & i can't delete them or disable auditing. Please suggest me how I can manage size of these files to avoid low disk space. Also let me know what happen if we limit size of these audit log files instead of Unlimited size option. Does this limiting size skip logs to be maintained after specified size is reached or have any other type of issue. I need to have an urgent solution if possible. Thanks for the help !! Regards. Rohit Toshniwal
auditlog-file-size
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Tom Staab avatar image
Tom Staab answered
My first suggestion is that you confirm you are capturing everything you need to capture and *not* capturing things you don't want. Not knowing anything about your environment, 1.5 GB per day of audit data could be due to a lot of transactions or it could be due to capturing too many event types (like auditing every SELECT when you really just need the INSERTs). Regarding file reuse, there are 3 options: 1. Grow until you run out of disk space. 2. Grow until a max number of files (with a specified size per file) and then fail auditing (optionally continuing or failing future audited operations or even shutting down the instance). 3. Grow until a max number of files (with a specified size per file) and then start reusing files beginning with the oldest one.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.