DP-300 Configure and manage automation of tasks Practice Question
You are responsible for automating index maintenance in Azure SQL Database. You need to ensure that index rebuilds and reorganizations are performed only when fragmentation exceeds 30% and 10%, respectively, and that the job runs weekly. Which approach should you use?
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 Elastic Database Jobs to run a script that rebuilds/reorganizes indexes.
Elastic Database Jobs can be used to run a T-SQL script on a schedule, checking fragmentation thresholds and performing rebuilds/reorganizations. This meets the requirement of weekly execution while checking thresholds (30% and 10%). Option D is incorrect because automatic index tuning in Azure SQL Database does not support a fixed schedule; it operates in real-time based on workload and cannot be set to run weekly. Options A and C are not suitable: A uses a SQL Agent job which is not available in Azure SQL Database (only in SQL Server on VMs), and C pertains to SQL Server on VMs, not Azure SQL Database.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a SQL Agent job using T-SQL script with sys.dm_db_index_physical_stats.
Why it's wrong here
Incorrect because Azure SQL Database does not have SQL Agent. SQL Agent jobs are available only in SQL Server on Azure VMs or on-premises.
- ✓
Use Elastic Database Jobs to run a script that rebuilds/reorganizes indexes.
Why this is correct
Correct. Elastic Database Jobs allows scheduling T-SQL scripts that can query sys.dm_db_index_physical_stats to check fragmentation and then rebuild or reorganize indexes based on thresholds and schedule.
- ✗
Schedule a maintenance task using SQL Server Agent in a VM running SQL Server.
Why it's wrong here
Incorrect. This refers to SQL Server Agent in a VM, which is not applicable to Azure SQL Database. The scenario is about Azure SQL Database, not a VM instance.
- ✗
Enable automatic index tuning in Azure SQL Database with the desired fragmentation thresholds.
Why it's wrong here
Incorrect. Automatic index tuning does not support a weekly schedule. It dynamically manages indexes based on workload, not on a fixed periodic schedule as required.
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.