Question 767 of 953
Configure and manage automation of taskshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to create an Elastic Database Job that runs a T-SQL script to rebuild and reorganize indexes based on fragmentation thresholds, scheduled via job schedule. This is the most efficient approach because Elastic Database Jobs are purpose-built for automated index maintenance across Azure SQL Databases, offering native scheduling, built-in retry logic, and centralized monitoring—unlike Azure Automation runbooks, which require manual schedule maintenance and error handling. On the DP-300 exam, this scenario tests your ability to choose the right tool for recurring T-SQL operations against Azure SQL, often appearing as a trap where candidates mistakenly select Azure Automation for its familiarity, forgetting that Elastic Database Jobs are the optimized, managed solution for index maintenance schedules. A key memory tip: think “Jobs for jobs”—Elastic Database Jobs handle repetitive database tasks like index rebuilds and reorganizations, while Automation is better suited for broader infrastructure orchestration.

DP-300 Configure and manage automation of tasks Practice Question

This DP-300 practice question tests your understanding of configure and manage automation of tasks. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You manage a critical Azure SQL Database that requires automated index maintenance. You need to ensure that index rebuilds only occur during low-usage periods defined in a schedule, while index reorganizations run more frequently. What is the most efficient way to implement this using Azure Automation?

Question 1hardmultiple choice
Full question →

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 Elastic Database Job that runs a T-SQL script to rebuild and reorganize indexes based on fragmentation thresholds, scheduled via job schedule.

Azure Automation runbooks can execute T-SQL scripts, but they require maintaining a schedule and handling errors manually. Elastic Database Jobs are purpose-built for scheduling T-SQL against Azure SQL Databases, providing simple scheduling, retry logic, and built-in monitoring. Option A is correct. Option B is less efficient because it requires more manual setup. Option C is not designed for this. Option D lacks scheduling.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 an Elastic Database Job that runs a T-SQL script to rebuild and reorganize indexes based on fragmentation thresholds, scheduled via job schedule.

    Why this is correct

    Elastic Database Jobs are the recommended service for automating T-SQL tasks across one or many Azure SQL databases, with built-in scheduling and retry.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Configure SQL Agent on the Azure SQL Database logical server to run index maintenance jobs.

    Why it's wrong here

    SQL Agent is not available in Azure SQL Database; it is only available in SQL Server on Azure VMs or Managed Instance.

  • Use Azure Automation runbooks with the Invoke-Sqlcmd cmdlet to run index maintenance scripts on a schedule.

    Why it's wrong here

    Azure Automation can work, but it requires more overhead for runbook development, module management, and doesn't natively integrate with Azure SQL schedules as cleanly as Elastic Jobs.

  • Deploy an Azure Function with a timer trigger that connects to the database and runs index maintenance commands.

    Why it's wrong here

    Azure Functions can perform this task but lack the built-in job scheduling, retry, and logging features provided by Elastic Database Jobs, making it less efficient.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Detailed technical explanation

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which DP-300 exam domain this question belongs to, then review the specific concept being tested. Practise related questions in that domain and focus on understanding why each wrong answer is tempting — not just why the correct answer is right.

Related practice questions

Related DP-300 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DP-300 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DP-300 question test?

Configure and manage automation of tasks — This question tests Configure and manage automation of tasks — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create an Elastic Database Job that runs a T-SQL script to rebuild and reorganize indexes based on fragmentation thresholds, scheduled via job schedule. — Azure Automation runbooks can execute T-SQL scripts, but they require maintaining a schedule and handling errors manually. Elastic Database Jobs are purpose-built for scheduling T-SQL against Azure SQL Databases, providing simple scheduling, retry logic, and built-in monitoring. Option A is correct. Option B is less efficient because it requires more manual setup. Option C is not designed for this. Option D lacks scheduling.

What should I do if I get this DP-300 question wrong?

Identify which DP-300 exam domain this question belongs to, then review the specific concept being tested. Practise related questions in that domain and focus on understanding why each wrong answer is tempting — not just why the correct answer is right.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

3 more ways this is tested on DP-300

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You are managing an Azure SQL Database that requires automated index maintenance. You want to use a solution that minimizes administrative overhead and leverages built-in Azure capabilities. Which approach should you recommend?

medium
  • A.Enable automatic tuning for the database and configure the 'CREATE INDEX' and 'DROP INDEX' recommendations.
  • B.Deploy a third-party maintenance solution and connect it to the Azure SQL Database.
  • C.Create a custom PowerShell script and run it via Azure Automation Runbook on a schedule.
  • D.Schedule a SQL Agent job to rebuild indexes using a T-SQL script.

Why A: Option C is correct because Azure SQL Database's automatic tuning can automatically create and drop indexes based on workload patterns, minimizing manual overhead. Option A is wrong because Elastic Database Jobs require custom scripting and are not fully automated. Option B is wrong because it still requires manual scheduling and maintenance. Option D is wrong because it is a third-party tool and not built-in.

Variation 2. A company uses Azure SQL Database and wants to automatically send an email notification when an index fragmentation exceeds 30% for any database. Which solution should they implement?

medium
  • A.Create an Azure Monitor alert based on fragmentation
  • B.Use Elastic Database Jobs to check fragmentation and send email
  • C.Configure SQL Agent job to send email
  • D.Use Azure Automation runbook to query sys.dm_db_index_physical_stats and send email

Why D: Azure Automation runbooks can query fragmentation and send emails via SendGrid. Elastic Database Jobs can check fragmentation but cannot send emails directly. Azure Monitor alerts can trigger on metrics like DTU but not on index fragmentation. Azure Logic Apps can receive data but require custom setup.

Variation 3. 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?

hard
  • A.Use Elastic Database Jobs to run index maintenance
  • B.Use Azure Automation runbook with Invoke-SqlCmd to run maintenance scripts
  • C.Use Azure Logic Apps with SQL connector
  • D.Create a SQL Agent job on the managed instance

Why B: Azure Automation runbooks can run maintenance scripts but require custom coding. SQL Agent is not available in managed instance. Elastic Database Jobs cannot be used with managed instance. Azure Logic Apps can trigger but are not ideal for long-running T-SQL. The correct approach is to use Azure Automation with PowerShell runbooks executing T-SQL.

Last reviewed: Jun 21, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.