DP-300 Configure and manage automation of tasks Practice Question
A company uses Azure SQL Managed Instance and needs to automatically rebuild fragmented indexes weekly during low usage. They also need to update statistics. Which approach should they take?
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 Automation runbook with Invoke-SqlCmd to run maintenance scripts
Azure Automation runbooks with Invoke-SqlCmd allow custom scheduling and execution of T-SQL scripts for index maintenance and statistics updates. Option A (Elastic Database Jobs) is designed for Azure SQL Database, not Managed Instance. Option C (Azure Logic Apps) can trigger but is not optimal for long-running maintenance tasks. Option D (SQL Agent job) is available in Azure SQL Managed Instance, but it is less flexible for automated scheduling during low usage windows and may impact performance; Azure Automation provides better orchestration and monitoring capabilities. Therefore, the best approach is to use Azure Automation runbook.
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 index maintenance
Why it's wrong here
Elastic Database Jobs are not supported with Azure SQL Managed Instance; they are designed for Azure SQL Database elastic pools.
- ✓
Use Azure Automation runbook with Invoke-SqlCmd to run maintenance scripts
Why this is correct
Azure Automation runbooks with Invoke-SqlCmd allow flexible scheduling and execution of T-SQL scripts for maintenance tasks like index rebuild and statistics update.
- ✗
Use Azure Logic Apps with SQL connector
Why it's wrong here
Azure Logic Apps can trigger T-SQL execution but are not ideal for long-running operations; they have timeouts and are less suited for heavy maintenance.
- ✗
Create a SQL Agent job on the managed instance
Why it's wrong here
SQL Agent is available in Azure SQL Managed Instance, but it is not the recommended approach for this scenario because it can consume resources and may not provide the same level of scheduling flexibility and integration as Azure Automation for low-usage periods.
Go deeper
Related to this question
Learn chapter
Overview of Azure Data Platform Options
Key term
Azure SQL Performance Tuning
Azure SQL Performance Tuning is the process of optimizing the speed and efficiency of queries and database operations in Microsoft Azure SQL Database or SQL Managed Instance to reduce latency and improve throughput.
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 906 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.