Courseiva

DP-300 Configure and manage automation of tasks Practice Question

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?

⚠ Common exam trap

DP-300 often tests whether candidates know that SQL Agent is unavailable in Azure SQL Database (but available in Managed Instance) — the trap is picking the SQL Agent job option because it is the familiar on-premises pattern.

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 to query sys.dm_db_index_physical_stats and send email

Azure SQL Database does not expose SQL Server Agent, and index fragmentation is not a native Azure Monitor metric, so the correct approach is an Azure Automation runbook that connects to the database, queries sys.dm_db_index_physical_stats, evaluates fragmentation, and sends email via SendGrid, Office 365, or SMTP. This is the standard pattern for custom T-SQL-based monitoring and alerting in 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 an Azure Monitor alert based on fragmentation

    Why it's wrong here

    Azure Monitor cannot query sys.dm_db_index_physical_stats, so index fragmentation is not a metric it can alert on. It is tempting because Azure Monitor alerts are the standard notification mechanism for Azure resources, and would be correct for platform metrics such as DTU consumption or storage percentage.

  • ✗

    Use Elastic Database Jobs to check fragmentation and send email

    Why it's wrong here

    Elastic Database Jobs can run T-SQL across databases, but they cannot send email notifications; no mail subsystem exists in Azure SQL Database. It is tempting because elastic jobs are the correct tool for scheduled cross-database T-SQL, such as rebuilding fragmented indexes, but notification requires an external mechanism.

  • ✗

    Configure SQL Agent job to send email

    Why it's wrong here

    Azure SQL Database does not expose an on-premises SQL Agent, so no job can be scheduled to run the fragmentation query and send mail. It is tempting because SQL Agent jobs are the familiar on-premises mechanism for scheduled index maintenance and alerting, and would be correct for a SQL Server instance hosted on a VM or Managed Instance.

  • ✓

    Use Azure Automation runbook to query sys.dm_db_index_physical_stats and send email

    Why this is correct

    An Azure Automation runbook can query sys.dm_db_index_physical_stats on a schedule, evaluate fragmentation against the 30% threshold, and dispatch email via Office 365 or SendGrid. Azure SQL Database lacks native alerting on DMV output, so automation is required.

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 →

How Courseiva writes practice questions · Editorial policy

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.