Package capturing a database schema as a SQL data-tier application, used for example to build the target schema ahead of a migration.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains DACPAC in context, with comparison tables and the common traps.
Terms in this definition
- Schema
The middle part of a Unity Catalog name (
catalog.schema.table), grouping tables, views, volumes, functions and models inside a catalog. A grant on it covers everything in it now and later, and nothing inside can be reached withoutUSE SCHEMA. - Serverless
Compute tier for single Azure SQL databases that scales automatically, pauses when idle and charges by the second. It is offered in General Purpose and Hyperscale, not Business Critical, and reserved capacity does not apply.
Related terms
- azure/sql-action
Used in GitHub workflows to publish a SQL project or
.dacpacto SQL Server or an Azure SQL database; it is a wrapper round SqlPackage. - DacFx
The Microsoft framework underneath SQL database projects, SqlPackage and schema comparison, which compiles SQL object definitions into a
.dacpacpackage and deploys it to a target database. Both SQL database in Fabric and Fabric Data Warehouse are supported targets. - Database reference
Lets a SQL project use objects it doesn't define itself, such as system objects or tables in another database, by pointing at a NuGet package, a
.dacpacor another project. - Microsoft.Build.Sql
An SDK for modern, SDK-style .sqlproj projects. Running dotnet build on Windows, Linux or macOS turns the project into a .dacpac; the VS Code SQL Database Projects extension relies on it, and it is succeeding the legacy .NET Framework format.
- Post-deployment script
Runs at the end of a .dacpac deployment, after the schema has been updated; database projects commonly use it to populate reference data so that rerunning it is safe.
- Pre-deployment script
Part of a database project: SQL that is executed first, ahead of any schema changes, whenever its .dacpac is deployed.
- Schema compare
A tool built on DacFx, found in SSMS, Visual Studio and the MSSQL extension for VS Code, that finds the differences between two sources (databases, SQL database projects or .dacpac files in any pairing). You can leave out chosen differences, then either update the target directly or produce a script that does so.
- SQL database project
Declarative database code held as .sql files, with one file per object, which is checked for valid syntax and references against a target platform and then compiled to a .dacpac. Fabric source control stores warehouses and SQL databases in the SDK-style Microsoft.Build.Sql format, which the SQL Database Projects extension in VS Code also uses.