Creating a Microsoft SQL Server audit specification

Create an audit specification to define the level of auditing events that are written to an audit file.

Before you begin

You must create an audit object. For more information, see Creating a Microsoft SQL Server auditing object.

About this task

You can create an audit specification at the server level or at the database level. Depending on your requirements, you might require both a server and database audit specification.

Procedure

  1. From the Microsoft SQL Server Management Studio navigation menu, select one the following options:
    • Security > Server Audit Specifications
    • <Database> > Security > Database Audit Specifications
  2. To enable Server or Database Audit, select one of the following options:
    • Right-click Server Audit Specification, then select New Server Audit Specifications
    • Right-click Database Audit Specification, then select New Database Audit Specifications
  3. In the Name field, type a name for the new audit file.
  4. From the Audit list, select the audit object that you created.
  5. In the Actions pane, add actions and objects to the server audit.
  6. Click OK.
  7. Right-click your server audit specification and select one of the following options:
    • Enable Server Audit Specification
    • Enable Database Audit Specification

What to do next

Create a SQL Server database view.