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?

  • Just delete the file, or set the rollover settings to reasonable values. – BradC Jan 22 '18 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. – Scott Hodgin Jan 22 '18 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.