liveBook · Manning

Dacpac

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

A dacpac file is a SQL Server database deployment package containing XML definitions of database objects.

A dacpac is a SQL Server deployment package produced by building a database project. It contains XML definitions of database objects inside a zip-format file. section 7.6.2

Use a dacpac as a controlled deployment artifact:

  • Build services create the dacpac after source-controlled changes and tests succeed. section 7.6.2
  • Deployment services publish the dacpac through release environments such as development or integration testing. section 7.6.2
  • Registering the database as a data-tier application can enable deployment blocking when the target has drifted. section 7.6.2

Inspecting a dacpac

Change the .dacpac extension to .zip to explore the XML files containing the database object definitions. section 7.6.2

Figure 7.9 CI/CD process

Follow the CI/CD process from source-controlled database changes through build, package creation, and deployment. section 7.6.2

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

How deep it goes
Defines the zip and XML structure and places creation within build services, but does not detail deployment internals.
Examples
Uses Visual Studio publishing, the Register As a Data-tier Application option, and renaming a dacpac to .zip for inspection.
What you can do after
Apply it via CI/CD tooling to package and promote database changes across release environments.
How it connects
Links database projects with CI/CD pipelines, source control, unit testing, deployment services, and database drift.

Also explained in

Compare how 2 books explain dacpac →

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.