dsccommunity / dsccommunity/SqlServerDsc

SqlSetup: Add support for sysprepped SQL Server.

Open
#2 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

It is possible to prepare SQL Server most of the way with SysPrep (https://msdn.microsoft.com/en-us/library/ee210754.aspx).

This allows partial installation of SQL Server to a machine that will be sysprepped as a template (with /ACTION=PrepareImage for instances, /ACTION=PrepareFailoverCluster for failover clusters), then the installation can be completed on the restored images (with /ACTION=CompleteImage for instances, /ACTION=CompleteFailoverCluster for failover clusters).

This could be modelled as:

xSQLServerSetup SQL {
    ...
    SysPrep = 'True'
}

The default value would be 'False'.

Set-TargetResource can then proceed as follows:

Instance Not Installed Instance Image Prepared Instance Installed
SysPrep = 'True' /ACTION=PrepareImage /ACTION=PrepareFailoverCluster No Action Error - cannot SysPrep installed instance
SysPrep = 'False' /ACTION=Install /ACTION=InstallFailoverCluster /ACTION=CompleteImage /ACTION=CompleteFailoverCluster No Action

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SqlSetup resource and its Set-TargetResource implementation, using the issue's SysPrep state table as the behavioral specification. Review how xSQLServerSetup exposes resource properties and how the existing install and failover-cluster actions are selected. Done means the SysPrep setting supports the listed prepare, complete, no-action, and error states for instances and failover clusters.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sql
Domain
databases, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.