SQL Flow Field Guide

CREATE DATABASE AUDIT SPECIFICATION

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

defines a database audit specification

What changes

Input
catalog
Output or change
security catalog: database audit specification

Syntax at a glance

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

Work example

A database audit must record selected actions for compliance review.

Map each audit action group to a control requirement and estimate event volume and retention.

Check your work The specification writes the required events to the active server audit destination.

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