SQL Server Desired State Configuration
SQLDSC is a command-line application to standardizes your SQL Server settings and configuration based on version-controlled configuration files.
Sample Configuration File
In this example,
- Set the
model
database to SIMPLE recovery - Disable the
sa
login - Set the cost threshold for parallelism to 50
Applying the Configuration
Features
- Test your configuration and find out what changes would be made
- Target multiple SQL Servers
- Default settings that can be overridden for each server
- Configuration objects include
- All
sp_configure
settings including disabling xp_cmdshell, maximum memory, cost threshold for parallelism, etc. - SQL Server and Domain logins with consistent SIDs
- Server permissions
- Server role membership
- SQL Server Agent jobs and operators
- Databases including owner, recovery model, and Read Committed Snapshot Isolation
- Database users
- Database role members
- Database permissions
.sql
script files for more complicated situations