contained database authentication
Allow contained databases with their own users and passwords.
- По умолчанию
0- Range
- 0 or 1
- Restart needed
- Нет
- Default checked on
- SQL Server 2025
Что оно делает
Contained users authenticate to the database without a server login, which makes databases portable between instances.
Значение по умолчанию
0. 0 (SQL Server 2025).
Check the current value
SELECT name, value, value_in_use, minimum, maximum, is_dynamic, is_advanced FROM sys.configurations WHERE name = 'contained database authentication'; EXEC sp_configure 'contained database authentication';
Change it
EXEC sp_configure 'contained database authentication', 1; RECONFIGURE;
No restart: it takes effect when RECONFIGURE runs (sys.configurations.is_dynamic = 1).
When to change it
When you use contained databases, for example to move databases between availability group replicas without syncing logins.
What can go wrong
Database owners can create users that can connect to the instance; review who owns contained databases.
Questions about contained database authentication
What is the default value of contained database authentication in SQL Server?
0. 0 (SQL Server 2025).
Does changing contained database authentication require a restart?
No. No restart: it takes effect when RECONFIGURE runs (sys.configurations.is_dynamic = 1).
When should I change contained database authentication?
When you use contained databases, for example to move databases between availability group replicas without syncing logins.
Back to all SQL Server settings, or check the SQL Server manual for every option.
Check contained database authentication on your own server
SQLly runs the query above against SQL Server and the other engines in this reference, from one desktop app on macOS, Windows and Linux.