DP-800 practice question 5 of 15

You have a GitHub Actions workflow that builds and deploys an Azure SQL database. The schema is stored in a GitHub repository as an SDK-style SQL database project. Following a code review, you discover that you need to generate a report that shows whether the production schema has diverged from the model in source control. Which action should you add to the pipeline?

Full set: 61 questions
Answer options
A: SqlPackage.exe /Action:DriftReport Correct answer
B: SqlPackage.exe /Action:DeployReport
C: SqlPackage.exe /Action:Extract
D: SqlPackage.exe /Action:Script
Correct Answer:
A. SqlPackage.exe /Action:DriftReport
Explanation

The SqlPackage.exe command-line utility includes the DriftReport action specifically for this purpose. This action compares the schema of a registered database against its baseline registration (typically the last deployed .dacpac) and generates an XML report detailing any changes or "drift" that has occurred directly on the production database, outside of the source-controlled deployment process.

Why Incorrect

B. The DeployReport action generates a report of changes that would be made by a deployment, not a report of drift that has already occurred.
C. The Extract action creates a .dacpac file from a live database. While this .dacpac could be used in a comparison, this action alone does not generate the drift report.
D. The Script action generates a T-SQL deployment script to update a target database. It does not produce a drift report.

References

1. Microsoft Docs, "SqlPackage DriftReport action". States: "The SqlPackage DriftReport action creates an XML report of the changes that have been made to a registered database since it was last registered."

2. Microsoft Docs, "SqlPackage command-line reference". Provides the syntax and parameters for all actions, clearly distinguishing the purpose of DriftReport from other actions like DeployReport and Script.

Scroll to Top