Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ dev_langs:
|max_files|**int**|Maximum number of files to use without the rollover option.|
|reserved_disk_space|**int**|Amount of disk space to reserve per file.|
|log_file_path|**nvarchar(260)**|Path to where audit is located. File path for file audit, application log path for application log audit.|
|log_file_name|**nvarchar(260)**|Base name for the log file supplied in the CREATE AUDIT DDL. An incremental number is added to the base_log_name file as a suffix to create the log file name.|
|log_file_name|**nvarchar(260)**|Base name for the log file supplied in the CREATE AUDIT DDL. An incremental number is added to the base_log_name file as a suffix to create the log file name.|
|retention_days|**int**|Lifetime in days of the audit log file. Applies to Azure SQL Database and Azure SQL Managed Instance <br /><br /> 0 = Unlimited. |

## Permissions
Principals with the **ALTER ANY SERVER AUDIT** or **VIEW ANY DEFINITION** permission have access to this catalog view. In addition, the principal must not be denied **VIEW ANY DEFINITION** permission.
Expand Down
7 changes: 7 additions & 0 deletions docs/t-sql/statements/create-server-audit-transact-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CREATE SERVER AUDIT audit_name
[ , ON_FAILURE = { CONTINUE | SHUTDOWN | FAIL_OPERATION } ]
[ , AUDIT_GUID = uniqueidentifier ]
[ , OPERATOR_AUDIT = { ON | OFF } ]
[ , RETENTION_DAYS = integer ]
}

<predicate_expression> ::=
Expand Down Expand Up @@ -141,6 +142,12 @@ To support scenarios such as database mirroring or databases participating in an

Indicates whether auditing captures Microsoft support engineer operations when they need to access your server during a support request.

#### RETENTION_DAYS

**Applies to:** Azure SQL Managed Instance and Azure SQL Database only.

Indicates the number of days of the audit log file storage period.

#### predicate_expression

Specifies the predicate expression used to determine if an event should be processed or not. Predicate expressions are limited to a length of 3,000 characters, which limits string arguments.
Expand Down