Export (0) Print
Expand All
2 out of 3 rated this helpful - Rate this topic

View a SQL Server Audit Log

This topic describes how to view a SQL Server audit log in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL.

In This Topic

Security

Permissions

Requires the CONTROL SERVER permission.

Arrow icon used with Back to Top link [Top]

To view a SQL Server audit log

  1. In Object Explorer, expand the Security folder.

  2. Expand the Audits folder.

  3. Right-click the audit log that you want to view and select View Audit Logs. This opens the Log File Viewer – server_name dialog box. For more information, see Log File Viewer F1 Help.

  4. When finished, click Close.

Arrow icon used with Back to Top link [Top]

To view a SQL Server audit log

  1. In Object Explorer, connect to an instance of Database Engine.

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    -- Reads from a file that is named \\serverName\Audit\HIPPA_AUDIT.sqlaudit 
    SELECT * FROM sys.fn_get_audit_file ('\\serverName\Audit\HIPPA_AUDIT.sqlaudit',default,default);
    GO
    

For more information, see sys.fn_get_audit_file (Transact-SQL).

Arrow icon used with Back to Top link [Top]

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.