CREATE SERVER AUDIT
defines a server audit
What changes
- Input
- catalog
- Output or change
- security catalog: server audit
Syntax at a glance
CREATE SERVER AUDIT audit_name { TO { [ FILE ( <file_options> [ ,... n ] ) ] | APPLICATION_LOG | SECURITY_LOG | URL | EXTERNAL_MONITOR } [ WITH ( <audit_options> [ ,... n ] ) ] [ WHERE <predicate_expression> ] } [ ; ]
Work example
A server audit needs a durable target for selected security and system events.
Review target access, failure behavior, file limits, retention, and the audit reader before activation.
Check your work The target is writable by the service account and protected from the audited principals.
Open Microsoft Learn for full syntax, permissions, and details for your version.