Skip to content

Commit b0b1395

Browse files
oberdanschrwestMSFT
authored andcommitted
Update sys-server-file-audits-transact-sql.md
Added retention_days. Update create-server-audit-transact-sql.md Added retention period
1 parent 4ac6a89 commit b0b1395

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/relational-databases/system-catalog-views/sys-server-file-audits-transact-sql.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ dev_langs:
4242
|max_files|**int**|Maximum number of files to use without the rollover option.|
4343
|reserved_disk_space|**int**|Amount of disk space to reserve per file.|
4444
|log_file_path|**nvarchar(260)**|Path to where audit is located. File path for file audit, application log path for application log audit.|
45-
|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.|
45+
|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.|
46+
|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. |
4647

4748
## Permissions
4849
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.

docs/t-sql/statements/create-server-audit-transact-sql.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ CREATE SERVER AUDIT audit_name
5555
[ , ON_FAILURE = { CONTINUE | SHUTDOWN | FAIL_OPERATION } ]
5656
[ , AUDIT_GUID = uniqueidentifier ]
5757
[ , OPERATOR_AUDIT = { ON | OFF } ]
58+
[ , RETENTION_DAYS = integer ]
5859
}
5960
6061
<predicate_expression> ::=
@@ -141,6 +142,12 @@ To support scenarios such as database mirroring or databases participating in an
141142

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

145+
#### RETENTION_DAYS
146+
147+
**Applies to:** Azure SQL Managed Instance and Azure SQL Database only.
148+
149+
Indicates the number of days of the audit log file storage period.
150+
144151
#### predicate_expression
145152

146153
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.

0 commit comments

Comments
 (0)