SQL Flow Field Guide

ALTER DATABASE SCOPED CREDENTIAL

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

changes a database scoped credential

What changes

Input
catalog
Output or change
security catalog: database scoped credential

Syntax at a glance

ALTER DATABASE SCOPED CREDENTIAL credential_name WITH IDENTITY = 'identity_name' [ , SECRET = 'secret' ]

Work example

A database-scoped external identity needs an approved rotation.

Identify the external data source and service that use it, then rotate through the secret owner.

Check your work The intended database operation authenticates and unrelated databases cannot use the credential.

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