Courseiva

DP-300 Configure and manage automation of tasks Practice Question

You have an Azure SQL Database that uses a failover group for high availability. You need to automate the failover to the secondary region during a planned maintenance window. What is the best approach?

⚠ Common exam trap

The trap is confusing traffic routing (Traffic Manager) or generic job scheduling (Elastic Jobs) with the actual database failover operation; candidates must recognize that planned failover requires a direct database control-plane command, not a DNS or job-based workaround.

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

✓

Use Azure CLI or PowerShell to invoke planned failover

Using Azure CLI or PowerShell to invoke a planned failover is the best approach because it provides a direct, scriptable, and auditable method to trigger failover during a planned maintenance window. Planned failover ensures no data loss by synchronizing all pending changes before switching, and it can be automated via scripts in Azure DevOps or other orchestration tools. This meets the requirement for automation during a planned window with minimal complexity.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Use Azure CLI or PowerShell to invoke planned failover

    Why this is correct

    Planned failover via Azure CLI or PowerShell performs a controlled switchover with zero data loss, letting you schedule it inside the maintenance window. It gracefully drains the primary before promoting the secondary, unlike an unplanned forced failover.

  • ✗

    Create an Azure Automation runbook that uses REST API

    Why it's wrong here

    Using REST API calls from an Azure Automation runbook lacks the built-in coordinated data loss handling and automatic DNS update that a planned failover via the failover group’s `failover` command provides. It is tempting because REST APIs offer granular control over individual database operations, and would be correct for orchestrating custom recovery workflows not covered by the failover group’s native mechanisms.

  • ✗

    Schedule an Elastic Database Job to execute a failover script

    Why it's wrong here

    Elastic Database Jobs run T-SQL against databases, but failover groups are managed through Azure Resource Manager or the failover group endpoint, not a job script. It tempts because jobs automate scheduled database tasks, which suits index maintenance or cross-database queries, not control-plane failover.

  • ✗

    Configure Azure Traffic Manager to route traffic to secondary

    Why it's wrong here

    Traffic Manager only redirects client DNS or HTTP connections; it cannot trigger the SQL failover group's role change, so the secondary database stays read-only. It tempts as a regional routing tool, which suits distributing application traffic, not automating planned database failover.

About these practice questions

Courseiva writes every DP-300 question from scratch — 574 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.