Courseiva
Configure and manage automation of taskseasyMultiple SelectObjective-mapped

DP-300 Configure and manage automation of tasks Practice Question

Which TWO Azure services can be used to automate the execution of T-SQL scripts on a schedule against Azure SQL Database?

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 Hybrid Runbook Worker with PowerShell Invoke-SqlCmd.

Options B and D are correct. Azure Automation Hybrid Runbook Worker can execute T-SQL scripts using PowerShell Invoke-SqlCmd on a schedule, making it suitable for automating script execution against Azure SQL Database. Elastic Database Jobs are specifically designed to run T-SQL scripts on a schedule across one or more Azure SQL databases. Option A is incorrect because Azure Logic Apps with SQL connector is better suited for workflows and not primarily for scheduled T-SQL script execution. Option C is incorrect because Azure Functions, while capable of running code with timer triggers, is not the optimal service for scheduled T-SQL scripts; Elastic Database Jobs is the dedicated solution. Option E is incorrect because Azure Data Factory is focused on data movement and orchestration, not direct scheduled execution of T-SQL scripts.

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 Logic Apps with SQL connector to execute stored procedures.

    Why it's wrong here

    Logic Apps are not designed for scheduled T-SQL scripts.

  • Azure Automation Hybrid Runbook Worker with PowerShell Invoke-SqlCmd.

    Why this is correct

    Hybrid Runbook Worker can run scripts on schedule.

  • Azure Functions with timer trigger and SqlConnection.

    Why it's wrong here

    While Azure Functions can execute code via a timer trigger, they lack the native orchestration and built-in SQL task scheduling found in Azure Data Factory or Elastic Jobs. This approach requires manual development of connection logic using SqlConnection and managing authentication via Microsoft Entra ID within the function code. You would use this method to perform lightweight, event-driven compute tasks or microservices rather than scheduled database administration workflows.

  • Elastic Database Jobs with T-SQL script execution.

    Why this is correct

    Elastic Database Jobs are purpose-built for scheduled T-SQL.

  • Azure Data Factory with a SQL Server Stored Procedure activity.

    Why it's wrong here

    ADF is for data movement, not maintenance scripts.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

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 →

How Courseiva writes practice questions · Editorial policy

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.