DP-300 Azure SQL Managed Instance failover group Practice Question
You are a database administrator for a multinational corporation that uses Azure SQL Managed Instance. The instance is part of a failover group for disaster recovery. You need to automate the process of testing the failover group by performing a planned failover to the secondary region and then failing back. The test must be performed monthly during a maintenance window. The automation must ensure that the failover group is in a healthy state before and after the test and must log the results to a table. What should you do?
⚠ Common exam trap
DP-300 often tests the distinction between control-plane operations (Azure PowerShell/CLI/REST) and data-plane T-SQL — candidates pick SQL Agent or Elastic Jobs because they think failover can be done in T-SQL, but failover group operations require Azure control-plane APIs.
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
✓
Create an Azure Automation runbook with PowerShell that uses the Az.Sql module to perform failover and log to a table.
Azure Automation runbooks with PowerShell and the Az.Sql module can programmatically invoke failover group operations (e.g., Invoke-AzSqlDatabaseFailoverGroup), check health state, and log results to a table (e.g., via AzTable or SQL). Automation runbooks support schedules (monthly maintenance window), managed identities for authentication, and full scripting control to verify the failover group is healthy before and after. This is the canonical Azure-native approach for orchestrating cross-region failover tests.
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 Elastic Database Jobs to run T-SQL that initiates failover and logs results.
Why it's wrong here
Elastic Database Jobs target databases within a logical server, not the managed instance's failover group operations; they cannot invoke the failover cmdlets or verify group health. They suit scheduled T-SQL across sharded databases, so this scenario needs Azure Automation or Logic Apps calling the failover REST API.
- ✓
Create an Azure Automation runbook with PowerShell that uses the Az.Sql module to perform failover and log to a table.
Why this is correct
Correct. Azure Automation runbooks can be scheduled to run monthly, use the Az.Sql module to perform planned failover and failback, and log results to a table. Although not entirely self-contained, it is the only viable option.
- ✗
Use Azure Data Factory to execute a stored procedure that performs failover.
Why it's wrong here
Azure Data Factory orchestrates data movement and pipelines; it cannot issue the ALTER AVAILABILITY GROUP failover command or query failover group health. It is tempting because Data Factory schedules recurring activities and logs runs, but failover automation requires T-SQL or PowerShell against the managed instance.
- ✗
Create a SQL Agent job with T-SQL that performs the planned failover using ALTER AVAILABILITY GROUP and logs the results to a table.
Why it's wrong here
A SQL Agent job runs T-SQL on the managed instance, but ALTER AVAILABILITY GROUP is not supported there for failover groups; failover uses the Azure CLI or PowerShell cmdlets. It is tempting because SQL Agent schedules and logs jobs, yet the failover group is an Azure resource, not an availability group.
Go deeper
Related to this question
Learn chapter
Deploying and Configuring Azure SQL Managed Instance
Key term
Azure SQL Managed Instance
Azure SQL Managed Instance is a fully managed cloud database service that gives you nearly all the features of Microsoft SQL Server on your own server, without you having to manage the hardware or operating system.
About these practice questions
One of 574 original DP-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.