Previous Topic: SQL Server Audit SpecificationsNext Topic: Define an SQL Server - Server Audit Specification


Define an SQL Server Server Audit

For SQL Server 2012, 2014, or 2016, use the SQL Server Server Audit Editor to define the actions on the server to audit and for whom. In addition, define the physical file that is used to contain the audit data.

To define an SQL Server server audit

  1. Click Model, Target - SQL Server, Server, Audits.

    The SQL Server Server Audit Editor opens.

  2. Select the server audit in the Navigation Grid that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a server audit. Use the Enter filter text box to filter a large list of server audits to locate the one that you want to define.

    Name

    Specifies the name of the server audit. You can change the name of the server audit in this field.

    Type

    Specifies the location for the audit trail. Select File, Application Log, or Security Log from the drop-down.

    Enabled

    Specifies the status of the audit.

    Generate

    Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.

  3. Click the General tab and work with the following options:
    Audit Options

    Lets you specify the following options for the server audit:

    Queue Delay

    Specifies the maximum time to wait, in milliseconds, before writing audit information to disk. Enter a value in this field.

    Failure Action

    Specifies the action to take upon failure to write an audit entry. Select an action from the drop-down.

    Audit GUID

    Specifies the GUID for the audit on a mirrored database. Enter the GUID in this field.

    Where

    Specifies the predicate expression that helps SQL Server determine the events that must be processed. The maximum number of characters you can enter is 3000.

    Audit File Options

    Lets you specify the following options for the audit file.

    Note: These options are available only if the server audit type is File, as specified in the Navigation Grid.

    File Path

    Specifies the location of the audit file. Enter the location in this field.

    Max Size

    Specifies the maximum size of the audit file. Enter a value in this field.

    Maximum Rollover Files

    Specifies the maximum number of audit files to retain. Enter a value in this field.

    Max Files

    Specifies the maximum number of audit files that can be created.

    Reserve Disk Space

    Specifies whether disk space must be preallocated. Select an option from the drop-down list.

  4. (Optional) Click the Comment tab and enter any comments that you want to associate with the object.
  5. (Optional) Click the Where Used tab to view where the object is used within the model.
  6. (Optional) Click the UDP tab to work with user-defined properties for the object.
  7. (Optional) Click the Notes tab to view and edit user notes.
  8. (Optional) Click the Extended Notes tab to view or edit user notes.
  9. Click Close.

    The server audit is defined and the SQL Server Server Audit Editor closes.