SqlPackage 170.6 Preview Introduces Deployment History and Fast Comparison
The SqlPackage 170.6 preview adds deployment logging and fast comparison features to optimize repeat database deployments. These tools record deployment history in the target database and can skip full schema comparisons when the model checksum and deployment options match the last record.
What changed From the source
The Microsoft.SqlPackage NuGet package version 170.6.40-preview introduces two complementary options for database deployments: LogDeployment and EnableFastComparison.
The LogDeployment property, when set to True, records deployment history within the target database inside the [sqlproj].[DeploymentHistory] table. The EnableFastComparison property uses compatible deployment history to bypass full schema comparisons during repeat deployments of the same model.
When both properties are active, SqlPackage checks for a compatible history in the target database. If the model checksum and deployment options align with the previous record, it avoids generating a deployment plan and reverse engineering the database. Otherwise, it falls back to normal comparison.
Project versions can also be captured in the deployment history and supplied to scripts using SQLCMD substitution variables such as $(DacVersion) and $(DacVersion_Previous), provided deployment logging is enabled.
- /p:LogDeployment=True logs deployment history to the target database.
- /p:EnableFastComparison=True enables fast comparison against the last deployment, requiring deployment logging.
- Pre- and post-deployment scripts are skipped during a fast-comparison match, but still execute under normal comparison.
At a glance · SQL Server & Data
What changedWhy it mattersWho should careUpgrade and migration considerations
Why it matters Analysis
Repeat database publishes in CI/CD pipelines typically incur the overhead of a full schema comparison even when the underlying model remains unchanged. These preview capabilities reduce that overhead by recognizing identical builds through checksum matching.
The inclusion of version variables offers a mechanism to handle version-specific data operations within pre- and post-deployment scripts without turning the declarative framework into an ordered migration engine.
- Pipeline efficiency improves by skipping unnecessary schema evaluations on retries or redundant publishes.
- Traceability increases because deployments are logged directly inside the target database.
Who should care Analysis
Database administrators, DevOps engineers, and .NET developers managing SQL database projects through automated pipelines will find these preview features relevant.
Teams dealing with frequent pipeline retries or continuous integration setups that publish stable schemas repeatedly can benefit from evaluating the preview package.
- CI/CD pipeline authors looking to optimize deployment times.
- Developers managing reference data updates using DACPAC version variables.
Upgrade and migration considerations Analysis
The source material notes that these features are part of a preview release (version 170.6.40-preview), and behavior or metadata may change. Users should install the package side by side rather than replacing stable global installations.
Several configuration guidelines apply when adopting this workflow. Developers must keep RegisterDataTierApplication set to False, as deployment history versioning should not be combined with DAC registration. Furthermore, fast comparison relies solely on recorded metadata and does not verify live schema drift, meaning teams allowing manual database alterations should disable fast comparison while keeping logging active.
- Do not combine DAC registration with deployment-history versioning.
- Keep pre- and post-deployment scripts idempotent because fast comparison skips them.
- Use normal comparison if manual database drift is a concern.
Sources and further reading
- Original post on Azure SQL Dev Corner (original source)
Original: “SqlPackage Deployment History and Fast Comparison Preview”, Azure SQL Dev Corner, published 17 Nov 2026, retrieved 17 Nov 2026. This article was drafted with AI assistance from the official source and passed automated fact and quality checks. Spotted a mistake? See our corrections policy.