liveBook · Manning

DSC configuration

As explained in 100 SQL Server Mistakes and How to Avoid Them

A DSC configuration is a declarative PowerShell specification of desired system configuration resources and their settings.

A DSC configuration is a declarative PowerShell specification of desired server resources and settings. It describes the target state rather than a one-time sequence of manual changes. section 8.9

Mistake 1: treating SQL Server configuration as a manual task. A DSC resource tests the current state, then runs its set method only when drift is found. Repeating that check can enforce security and operational standards across multiple servers. section 8.9

A practical DSC configuration typically includes:

  • Resources such as SQL instance setup and SQL configuration, with values for the desired state. section 8.9
  • A node declaration identifying the target server and resource dependencies. section 8.9
  • Compilation into a Managed Object Format document before application. section 8.9

Installing and enforcing a SQL instance

An InstallSql configuration can install a SQL instance, disable remote access, and create a login. Compile it with InstallSql -Edition Developer, then apply the generated configuration using Start-DscConfiguration -Path 'C:\dsc\InstallSql' -Verbose. section 8.9

Figure 8.3 Configuration management process

Use the process diagram to follow recurring test-and-set enforcement across SQL Server hosts. section 8.9

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Explains resources, test and set methods, manifests, MOF compilation, and application, while deferring full DSC coverage.
Examples
Demonstrates SQL instance installation, remote-access disabling, login creation, configuration compilation, and application.
What it assumes
Assumes basic PowerShell familiarity while introducing DSC resources, manifests, MOF output, and desired-state enforcement.
What you can do after
Apply it via PowerShell DSC to compile and enforce repeatable SQL Server configurations.
How it connects
Connects desired state with configuration management, drift detection, PowerShell DSC, MOF documents, and SQL Server resources.

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.