liveBook · Manning

Data-tier application

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

A data-tier application is an application architecture component that encapsulates database schema, data, and related database deployment or management artifacts.

1. Mistake: treating a data-tier application as only a database. That approach hides related code, users, logins, and deployment artifacts, making automated delivery harder to control. A DAC packages these dependencies with a unique version number for continuous delivery. section 7.6.2

A lift-and-shift migration can also be a costly assumption. Large data-tier applications may contain hundreds of thousands of lines of code in components such as SQL Server Integration Services, requiring re-architecture rather than direct movement to a DBaaS offering. section 1.3

Use these checks when preparing a database for controlled deployment:

  • Package tables, procedures, users, and dependent instance-level logins as one versioned DAC. section 7.6.2
  • Register the database from SSMS or publish a Visual Studio project as a DAC. section 7.6.2
  • Enable deployment blocking when the target database has drifted from the project. section 7.6.2
  • Inspect a DACPAC by changing its extension to .zip and reviewing its XML object definitions. section 7.6.2

A versioned deployment package

A Visual Studio database project is built and published with Register As a Data-tier Application selected. The build produces a DACPAC containing XML definitions for the database objects; the continuous-delivery process can then use its unique version and reject deployment if the target has drifted. section 7.6.2

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

How deep it goes
Defines packaging, registration, publishing, drift blocking, and DACPAC structure, but defers granular pipeline configuration.
Examples
Uses tables, procedures, users, logins, Visual Studio publishing, SSMS registration, and DACPAC-to-ZIP inspection.
What it assumes
Assumes database-project and CI/CD familiarity, while deferring configuration details for organization-specific tooling.
What you can do after
Apply it via Visual Studio publishing or SSMS registration, version packages, and block deployment when target drift is detected.
How it connects
Connects data-tier applications with CI/CD pipelines, source control, deployment services, Visual Studio, SSMS, and DBaaS migration.

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.