DP-300 Configure and manage automation of tasks Practice Question
Which TWO methods can be used to automate index maintenance in Azure SQL Database?
⚠ Common exam trap
Watch out — candidates often assume SQL Server Agent (Option B) is available in Azure SQL Database, but it is only supported in Azure SQL Managed Instance, not the single database or elastic pool service tiers.
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 Automation runbooks executing T-SQL scripts
Azure Automation runbooks can execute T-SQL scripts against Azure SQL Database using the Invoke-SqlCmd cmdlet or similar, enabling scheduled index maintenance tasks such as rebuilding or reorganizing indexes. This method is fully supported in Azure SQL Database, which lacks SQL Server Agent, and allows for flexible, cloud-native automation.
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 Automation runbooks executing T-SQL scripts
Why this is correct
Runbooks can connect to Azure SQL Database and run maintenance scripts.
- ✗
SQL Server Agent jobs
Why it's wrong here
SQL Server Agent jobs are not available in Azure SQL Database, which is a platform-as-a-service offering where Microsoft manages the underlying infrastructure. Consequently, users cannot directly create or manage these jobs for index maintenance within an Azure SQL Database. This option is tempting because SQL Server Agent is the standard mechanism for scheduling such administrative tasks in on-premises SQL Server and Azure SQL Managed Instance, providing extensive job scheduling capabilities.
- ✗
Azure Data Factory pipelines
Why it's wrong here
Data Factory is for data movement, not index maintenance.
- ✓
Elastic jobs with T-SQL steps
Why this is correct
Elastic jobs are designed for scheduling T-SQL tasks across databases.
- ✗
Automatic tuning
Why it's wrong here
Automatic tuning does not perform index maintenance; it creates or drops indexes.
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.
About these practice questions
This DP-300 question is part of Courseiva's 906-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 →
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.