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
Before you begin:
Security
To view a SQL Server audit log, using:
SQL Server Management Studio
Transact-SQL
Before You Begin
Security
Permissions
Requires the CONTROL SERVER permission.
[Top]
Using SQL Server Management Studio
To view a SQL Server audit log
In Object Explorer, expand the Security folder.
Expand the Audits folder.
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.
When finished, click Close.
[Top]
Using Transact-SQL
To view a SQL Server audit log
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
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).
[Top]