SQL Flow Field Guide

CREATE SERVER AUDIT SPECIFICATION

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

defines a server audit specification

What changes

Input
catalog
Output or change
security catalog: server audit specification

Syntax at a glance

CREATE SERVER AUDIT SPECIFICATION audit_specification_name FOR SERVER AUDIT audit_name { { ADD ( { audit_action_group_name } ) } [, ...n] [ WITH ( STATE = { ON | OFF } ) ] } [ ; ]

Work example

A server audit needs a defined set of server-level action groups.

Map each selected group to an audit requirement and estimate event volume before enabling it.

Check your work A lab action writes the required event and the specification omits unrelated high-volume groups.

Open Microsoft Learn for full syntax, permissions, and details for your version.