1

I'd like to set up SQL Audit on our SQL 2014 database and then setup a process where we read the contents of the audit file, on a periodic basis, using fn_get_audit_file() but then immediately truncate the audit file to prevent the files from accumulating and growing. I cannot find a way to truncate the audit file. Is it possible to do this?

2
  • Just delete the file, or set the rollover settings to reasonable values.
    – BradC
    Commented Jan 22, 2018 at 17:54
  • I'd suggest using a relatively small rollover file size (say 10mb) and then use the technique in this post to periodically capture the audit data and subsequently delete the audit logs that have been processed. Commented Jan 22, 2018 at 18:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.