SQL Server Audit file

I have faced with some challenge regarding my audit. I need to save my audit events on a file, but file should be in a readable format ( like txt) which will allow to analyze it out of SSMS. XXXXX.sqlaudit format does not allow this. Maybe you know options that will help to export audit events` file to readable format ? Thanks in advance.


SQL Server Audit logs to either a binary file or Windows Application log or Windows Security log. There are different options for reading the output depending on where you have logged to. If you are logging to a binary file you could create a simple process that reads it with sys.fn_get_audit_file and outputs to a readable textfile, eg using SSIS, use an 'Execute SQL' task to run the following SQL and pipe the output to a text file:

FROM sys.fn_get_audit_file ( 'X:\SQLAudit\yourAuditName_*.sqlaudit', DEFAULT, DEFAULT );

You will need some way of tracking the files you have imported/exported so a simple table would help there.

A quick google shows someone else has done something similar with Powershell here.

Category: sql server 2012 Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.213 (s). 12 q(s)