liveBook · Manning

Deployment pipeline

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

A CI/CD pipeline is an automated workflow that integrates, tests, and delivers software changes through continuous integration and continuous delivery or deployment.

Mistake #32: treating deployment as a one-off DBA exercise. Keeping the only reliable schema copy on a development instance and sending complex scripts to production invites environment-specific failures. section 7.6 section 7.6.2

MagicChoc’s maintenance window

MagicChoc’s developers stored code on their development instance, relied on weekly backups, and manually scripted data into temporary tables before dropping and recreating objects. A CI/CD workflow packages the application and applies repeatable releases instead, reducing deployment complexity, bugs, and time to market. section 7.6 section 7.6.2

A data-tier application (DAC) supports continuous delivery by packaging database artifacts and dependencies into a uniquely versioned package. It can include tables, procedures, users, and instance-level objects such as logins. section 7.6.2

Use a safer deployment routine:

  • Keep T-SQL code in source control for version history and rollback. section 7.7
  • Build and publish the database project as a DAC through Visual Studio, or register the database from SSMS. section 7.6.2
  • Use schema comparison to understand changes, check for drift, and assess affected functionality before deployment. section 7.6.2 section 7.7
  • Add unit tests for programmable objects before releasing incremental changes. section 7.7
Figure 7.9 CI/CD process

Use the CI/CD process figure to orient the workflow from packaged changes through controlled deployment. section 7.6.2

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

How deep it goes
Explains deployment rationale and DAC packaging, but defers granular configuration because tooling and enterprise requirements vary.
Examples
Uses MagicChoc’s manual deployment, DAC packages, Visual Studio publishing, SSMS registration, and SSDT Schema Compare.
What you can do after
Operate/configure a safer release process using DAC packaging, schema comparison, source control, and unit tests.
How it connects
Connects CI/CD with source control, data-tier applications, schema comparison, database projects, and unit testing.

Also explained in

Compare how 30 books explain deployment pipeline →

Related concepts

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.