Viewing the Audit Trail

The easiest way to view the audit trail is to select the SQL Server Audit in Object Explorer and select View Logs in the context menu. This opens the Log File Viewer to the Audit Collection, as shown in Figure 42.4. The filter is useful to narrow the event viewed.

Figure 42.4 Viewing the audit history using Management Studio's Log File Viewer. Here, select statements issued in AdventureWorks2012 are audited on a per-table basis.

42.4

Using T-SQL, the logs can be read with the fn_get_audit_file function.

Enhancements have been made to Management Studio in SQL Server 2012 with the addition of new audit dialog boxes. These include the ability to manage the new filter audits feature. Additionally, you can now view the Windows NT logs; however, this feature is available in more than just SQL Audit.

Get Microsoft SQL Server 2012 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.