Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 2.11 KB

File metadata and controls

43 lines (30 loc) · 2.11 KB
title View a SQL Server Audit Log
description Learn how to view a SQL Server audit log in SQL Server by using SQL Server Management Studio. Viewing requires CONTROL SERVER permission.
author sravanisaluru
ms.author srsaluru
ms.reviewer vanto
ms.date 05/15/2024
ms.service sql
ms.subservice security
ms.topic how-to
helpviewer_keywords
audits [SQL Server], viewing logs
viewing audit logs
logs [SQL Server], audit

View a SQL Server Audit Log

[!INCLUDE SQL Server]

This article describes how to view a SQL Server audit log in [!INCLUDE ssnoversion] by using [!INCLUDE ssManStudioFull].

Permissions

Requires the CONTROL SERVER permission.

Using SQL Server Management Studio

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. The Log File Viewer - server_name dialog box opens. For more information, see Log File Viewer F1 Help.

  4. When finished, select Close.

[!INCLUDE msCoName] recommends viewing the audit log by using the Log File Viewer. However, if you're creating an automated monitoring system, the information in the audit file can be read directly by using the sys.fn_get_audit_file function. Reading the file directly returns data in a slightly different (unprocessed) format. For more information, see sys.fn_get_audit_file (Transact-SQL).

Related content