Pragmatic Works Blog

Azure SQL DB - What Happened to SQL Server Agent?

Written by Bob Rubocki | Apr 05, 2017

SQL Server Agent is not available in Azure SQL DB. So how do we manage tasks for which we currently use SQL Server Agent? During last week's free webinar, our Senior Business Intelligence Consultant Bob Rubocki explained why the absence of SQL Server Agent may not be the end of the world when working with Azure SQL DB.  He also discussed Azure Automation as an alternative for some tasks previously managed with SQL Server Agent.

Expanding on his presentation,  Bob has addressed additional questions to help provide a clearer understanding of Azure and SQL Server Agent. Slides from Bob's presentation are available here:  AzureAutomation_PPT

  1. Is it possible to send e-mail notifications based on the results of an individual job?

The short answer is yes, but it’s not that simple.  There is currently no way to add notifications to Azure Automation the way we do today in SQL Server Agent.  You could add logic to your runbook to send email based on certain events.  Your email configurations could be stored as Azure Automation variables for reuse.

I also suggest reading this post: https://azure.microsoft.com/en-us/updates/send-your-runbook-job-status-and-job-streams-from-automation-to-log-analytics-oms/.  It describes a technique for using Azure Log Analytics to consume Azure Automation Logs.  Azure Log Analytics has capabilities for sending notifications based on certain logged events.

In either case, I suggest also enabling detailed logging on your runbook.  The screenshot below shows how to enable this from the Azure Portal.

Runbook Logging Options
  1. is there any way to handle the execution of ssis packages stored locally?

Azure Automation works on Azure resources.  It cannot be used for executing local SSIS packages.

 

  1. is there a way to calculate a local vm's dtu's, for comparing against cloud azure sql db?

Justin Henriksen from Microsoft has created an Azure SQL DB DTU Calculator available here: http://dtucalculator.azurewebsites.net/.  This is a good place to start understanding what tier of Azure SQL DB will support workload of an existing on-prem database.

I also recommend this great post on sqlperformance.com written by Andy Mallon: What the heck is a DTU?  Andy runs tests and compares existing workloads to Azure SQL DB tiers, and also estimates Azure VM specs that would support various Azure SQL DB service tiers.  It’s a very interesting read!

 

  1. Is it possible to call azure sql dw stored procedure from azure automation?

Yes.  Refer to this script from the Runbook Gallery to get started with running SQL Scripts via a runbook: How to use a SQL Command

 

  1. Is it possible to process ssas tabular models in an azure vm from azure automation?

I haven’t seen a good way to do this.  If you are running SSAS in a VM, you may be better off using SQL Agent to automate SSAS processing.

 

  1. can you use azure data factory as an alternative to running ssis on an azure vm?

Possibly, yes.  Azure Data Factory is not intended to be a cloud based replacement for SSIS.  It depends on how you are using SSIS.  In ETL scenarios, Azure Data Factory is not very good at the T (transform).  I suggest reading this post from James Serra at Microsoft where he outlines some differences and similarities between SSIS and Azure Data Factory: Azure Data Factory and SSIS Compared

 

Interested in expanding your knowledge on your own terms?