Courseiva

DP-300 Configure and manage automation of tasks Practice Question

You need to automate the deployment of an Azure SQL Database and its schema updates as part of a CI/CD pipeline. The pipeline must apply T-SQL scripts to the database after deployment. Which Azure DevOps task should you use to execute the T-SQL scripts against Azure SQL Database?

⚠ Common exam trap

The trap here is choosing a generic task like Azure PowerShell or Command Line, which can work but require custom code, instead of the purpose-built SQL deployment task.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Azure SQL Database deployment task

The Azure SQL Database deployment task is built for executing T-SQL scripts against Azure SQL Database in a pipeline. It supports both inline scripts and script files, and it handles authentication via service connections. This makes it the most efficient and reliable choice for applying schema changes in CI/CD.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Azure PowerShell task

    Why it's wrong here

    The Azure PowerShell task can run PowerShell scripts, and you could use it to invoke sqlcmd or the SqlServer module to run T-SQL. However, it is not purpose-built for SQL deployment and requires custom scripting. The Azure SQL Database deployment task is more direct and reduces the chance of errors in the pipeline.

  • ✓

    Azure SQL Database deployment task

    Why this is correct

    The Azure SQL Database deployment task in Azure Pipelines is designed to execute T-SQL scripts against an Azure SQL Database. It supports inline scripts or script files and handles authentication. This task is the native way to apply schema updates in a CI/CD pipeline for Azure SQL Database.

  • ✗

    Command line task

    Why it's wrong here

    A command line task can run executables like sqlcmd, but it requires you to manage connection strings, authentication, and error handling manually. The Azure SQL Database deployment task abstracts these details and is specifically designed for this purpose. Using a generic command line task adds unnecessary complexity and potential for misconfiguration.

  • ✗

    Azure CLI task

    Why it's wrong here

    The Azure CLI task runs Azure CLI commands, which can manage Azure resources but are not intended for executing T-SQL scripts against a database. While you could use az sql db commands, they do not run arbitrary T-SQL. Therefore, this task is not suitable for applying schema updates.

Go deeper

Related to this question

About these practice questions

This DP-300 question is part of Courseiva's 574-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This DP-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-300 exam.