SQL Flow Field Guide

ALTER DATABASE SCOPED CONFIGURATION

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

changes database scoped configuration (no row flow)

What changes

Input
catalog
Output or change
catalog: database scoped configuration

Syntax at a glance

ALTER DATABASE SCOPED CONFIGURATION { { [ FOR SECONDARY ] SET <set_options> } } | CLEAR PROCEDURE_CACHE [ plan_handle ] | SET <set_options> [ ; ]

Work example

One database needs a scoped query-processing or optimizer setting change.

Capture the current value and compare workload plans on a representative copy before changing it.

Check your work The setting applies only to the intended database and the measured query behavior meets its target.

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