SQL Server Audit logs

  • Is there anyway to export SQL Audit logs into notepad or Excel for auditing purpose? After successfully created the auditing log but it can only view in SSMS. Due to auditing requirement, audit trail log needs to be readable by the auditor and it is impossible for them to view in SSMS, is there any other methods/practice in your organization?

  • Riic - Sunday, October 8, 2017 1:02 AM

    Is there anyway to export SQL Audit logs into notepad or Excel for auditing purpose? After successfully created the auditing log but it can only view in SSMS. Due to auditing requirement, audit trail log needs to be readable by the auditor and it is impossible for them to view in SSMS, is there any other methods/practice in your organization?

    You can query the files using sys.fn_get_audit_file and you can import them into a table using the same function, something like:


    SELECT *
    into YourAuditTable
    FROM sys.fn_get_audit_file('FilePatternPathToAuditFile', DEFAULT, DEFAULT)

    From there, you can do whatever you need to do in terms of access or reporting on the audit data - allow queries, export to different formats, create reports, etc.

    Sue

  • Thank you Sue! Will give it a shot.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply