Courseiva

DP-300 Configure and manage automation of tasks Practice Question

You are the database administrator for a large e-commerce company that uses Azure SQL Database for its transactional systems. The environment consists of 100 databases spread across 10 elastic pools in different regions. You need to implement an automated solution to perform the following tasks every night: (1) Run integrity checks (DBCC CHECKDB) on all databases, (2) Rebuild indexes with fragmentation > 30%, (3) Update statistics with full scan for databases that have had significant data changes (>20% of rows). The solution must minimize manual intervention, provide centralized logging, and be resilient to failures (e.g., if one database fails, the others should continue). Which approach should you use?

⚠ Common exam trap

DP-300 often tests the misconception that Azure SQL Database supports SQL Agent jobs like SQL Server — candidates pick SQL Agent jobs, forgetting that Azure SQL Database is PaaS and lacks SQL Agent.

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 with step scripts for each maintenance task, targeting all databases, and configure retry logic.

Elastic Database Jobs are purpose-built for running T-SQL across many Azure SQL databases, including those in elastic pools across regions. You can define step scripts for DBCC CHECKDB, index rebuilds, and statistics updates, target all databases, and configure retry logic so a failure on one database doesn't stop the others — meeting the automation, centralized logging, and resilience requirements.

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 with step scripts for each maintenance task, targeting all databases, and configure retry logic.

    Why this is correct

    Elastic Database Jobs run T-SQL against every database in the target group from a single job agent, satisfying the centralised, low-touch requirement across 100 databases in 10 pools. Per-database execution isolates failures, so one database erroring does not halt the others, and built-in retry logic plus job history logging meet the resilience and centralised logging constraints.

  • ✗

    Create a SQL Agent job on each server to run a maintenance script.

    Why it's wrong here

    Azure SQL Database does not expose SQL Agent, so a job cannot be created on each logical server; the 100 databases also span 10 pools, multiplying manual deployment. It tempts because SQL Agent is the standard on-premises and SQL Managed Instance maintenance scheduler, which would fit a single-instance scenario.

  • ✗

    Use Azure Data Factory pipelines with a ForEach activity to execute stored procedures.

    Why it's wrong here

    Data Factory orchestrates pipelines but its stored-procedure activity cannot run DBCC CHECKDB against Azure SQL Database, and per-database failure isolation with centralised logging is not native. It tempts for scheduled cross-database orchestration, which suits ETL workflows rather than SQL maintenance.

  • ✗

    Use Azure Automation runbooks with Invoke-SqlCmd to loop through each database.

    Why it's wrong here

    Invoke-SqlCmd runbooks can loop databases, but Azure Automation lacks native per-database failure isolation and centralised maintenance logging, and DBCC CHECKDB is unsupported on Azure SQL Database. It tempts for scheduled PowerShell automation, which suits general Azure administration rather than database maintenance.

About these practice questions

Courseiva writes every DP-300 question from scratch — 574 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.