AZ-400 exam dumps

AZ-400 practice question 180 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 180

Select 2

You are a DevOps engineer for a financial services company that hosts an application in Azure. The application uses an Azure SQL Database to store customer and transaction data. You have a .dacpac file, generated during the build stage, containing the latest schema changes for the database. You need to configure the release pipeline in Azure DevOps to deploy these schema changes automatically and fail the deployment if any errors occur. Which two tasks should you include to accomplish this?

  1. A

    A: Use the 'Azure SQL Database Deployment' task, referencing the .dacpac file and appropriate SQL authentication details

  2. B

    B: Use the 'Azure Resource Manager Template Deployment' task, passing the .dacpac as a parameter

  3. C

    C: Use a script-based task such as 'Azure PowerShell' or 'Command Line' to run SqlPackage.exe with the .dacpac file

  4. D

    D: Use the 'VSBuild@1' task to compile the .dacpac file again before deployment

Show answer and explanation

Correct answers: A, C

Explanation

To include database tasks in an Azure DevOps release pipeline, you typically use the Azure SQL Database Deployment task with .dacpac files or deploy them via SqlPackage.exe in a script-based task. Both methods handle database deployments reliably and can fail the pipeline if a deployment error occurs. Using ARM templates does not apply schema changes from a .dacpac, and recompiling the database project in the release stage is unnecessary once the .dacpac artifact has been generated in the build stage. For reference, consult the Microsoft documentation on Azure SQL Database Deployment tasks and SqlPackage.exe usage for detailed parameters and best practices.

  • A. Correct.

    Option A is correct. The 'Azure SQL Database Deployment' task (often referred to as 'SQLAzureDacpacDeployment@1' in YAML) is specifically designed for deploying .dacpac files or running SQL scripts against an Azure SQL Database. It includes built-in checks to fail the pipeline on deployment errors, making it a direct fit.

  • B. Incorrect.

    Option B is incorrect. The 'Azure Resource Manager Template Deployment' task is intended for deploying or updating Azure infrastructure resources via ARM templates, not for deploying .dacpac files. Passing a .dacpac to an ARM template will not apply the schema changes.

  • C. Correct.

    Option C is correct. Using 'Azure PowerShell' or 'Command Line' tasks to run SqlPackage.exe is a valid approach to deploy .dacpac files. You can script out the deployment and configure the task to fail on errors, providing flexibility for custom logic if needed.

  • D. Incorrect.

    Option D is incorrect. 'VSBuild@1' compiles Visual Studio projects, but you already have a .dacpac. Rebuilding the .dacpac isn�t necessary in the release pipeline and does not directly apply schema changes.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam