Skip to main content

Automation Decision Matrix

This page is your quick reference for choosing the right automation tool for any DBA task across all Azure SQL platforms.

The Decision Matrix

TaskSQL on VMSQL MIAzure SQL DBRecommended Tool
Index maintenanceSQL AgentSQL AgentElastic JobsT-SQL-based scheduling
Statistics updateSQL AgentSQL AgentElastic JobsT-SQL-based scheduling
DBCC CHECKDBSQL AgentSQL AgentN/A (PaaS)SQL Agent
Backup managementSQL AgentAutomatedAutomatedPlatform-managed for PaaS
Schema deploymentAzure DevOpsAzure DevOpsAzure DevOpsCI/CD pipeline + DACPAC
Scale vCoresN/A (VM resize)Automation RunbookAutomation RunbookPowerShell w/ Managed Identity
Failover testingSQL AgentAutomation RunbookAutomation RunbookScheduled failover script
Send alertsDatabase MailAzure MonitorAzure MonitorPlatform alerting
Cross-DB T-SQLMulti-server adminLinked ServersElastic JobsPer-platform best tool
Compliance checksAutomation RunbookAutomation RunbookAutomation RunbookPowerShell scanning
Report generationSSIS / SQL AgentADF / AutomationADF / AutomationCloud-native ETL
Workflow orchestrationSSISLogic AppsLogic AppsVisual workflow designer
Custom code automationTask SchedulerAzure FunctionsAzure FunctionsTimer-triggered functions

Platform Availability Quick Reference

ToolSQL on VMSQL MIAzure SQL DB
SQL Server Agent✅ Full✅ T-SQL only
Elastic Jobs
Azure Automation
Logic Apps
Azure Functions
Azure DevOps
Bicep / ARM
Database Mail

Decision Flowchart (Text)

What do you need to automate?

  1. T-SQL on a single database?

    • VM/MI → SQL Agent job
    • SQL DB → Elastic Job (or Azure Automation with Invoke-Sqlcmd)
  2. T-SQL across multiple databases?

    • SQL DB → Elastic Jobs with target group
    • VM → Multi-server administration
    • MI → SQL Agent on each MI (no cross-MI jobs)
  3. PowerShell / Azure resource management?

    • All platforms → Azure Automation Runbook with Managed Identity
  4. Complex workflow with multiple services?

    • All platforms → Logic Apps (visual) or Azure Functions (code)
  5. Infrastructure deployment?

    • All platforms → Bicep + Azure DevOps/GitHub Actions pipeline
  6. Schema changes?

    • All platforms → SSDT + DACPAC + CI/CD pipeline

Cost Comparison

ToolCost ModelMonthly Estimate (typical DBA use)
SQL AgentIncluded with SQL license$0
Elastic JobsJob agent + S1 job DB~$30-50/month
Azure Automation500 free min/month, then per-min~$0-10/month
Logic Apps (Consumption)Per action (~$0.000125/action)~$1-5/month
Azure Functions (Consumption)1M free executions/month~$0/month
Azure DevOpsFree tier (1 agent, 1800 min/month)$0
🏢 Real-World DBA Note

Cost-effective pattern for most DBAs: SQL Agent for VM/MI jobs (free), Azure Automation for PowerShell (500 free min), Azure Monitor alerts (basic metrics free), Azure DevOps free tier for CI/CD. Total additional cost: ~$0-10/month.

Migration Path: On-Prem → Cloud Automation

On-Prem ToolCloud Equivalent
SQL Agent (on-prem)SQL Agent (VM/MI) or Elastic Jobs (SQL DB)
Windows Task SchedulerAzure Automation or Azure Functions
SSISAzure Data Factory SSIS IR or ADF pipelines
PowerShell scriptsAzure Automation Runbooks
cron jobs (Linux)Azure Functions Timer Trigger
Nagios / Zabbix alertsAzure Monitor + Action Groups
ServiceNow integrationAzure Monitor → ITSM connector
🎯 Exam Focus

DP-300 commonly tests: "Which automation tool for Azure SQL Database?" → Elastic Jobs for T-SQL, Azure Automation for PowerShell. "Which for MI?" → SQL Agent (T-SQL only) + Azure Automation. "Which for VM?" → SQL Agent (full) + Azure Automation.


Flashcards

What automation tool replaces SQL Agent for Azure SQL Database?
Click to reveal answer
Elastic Jobs for T-SQL scheduling, Azure Automation for PowerShell. SQL Agent is not available on Azure SQL DB.
1 / 5

Quiz

Q1/5
0 correct
A customer has 100 Azure SQL databases and needs to run weekly index maintenance T-SQL across all of them. What should they use?