Tracking Azure Elastic Jobs using Redgate Monitor
Redgate Monitor has long helped data teams and DBAs keep track of SQL Agent Jobs. Now, with version 14.0.53, it extends that visibility to Azure Elastic Jobs, giving you a centralized view of all your scheduled tasks, whether they run on SQL Server, Azure SQL Managed Instances, or Azure SQL Databases.
What is an Azure Elastic Job?
Azure Elastic Jobs are used to schedule routine tasks across Azure SQL Databases, while SQL Agent Jobs cover SQL Server or Azure SQL Managed Instances.
Unlike SQL Agent Jobs, which only operate on the local instance, Elastic Jobs let you define custom jobs in a single job database and then execute them across multiple Azure SQL Databases, even if they’re hosted on different logical servers, in separate subscriptions, or in different regions. This ensures that important tasks are performed consistently across all Azure SQL Databases. For example, if you have a script to automate user creation and role assignments, you can use an elastic job to run it on a defined schedule across every relevant database.
However, when you’re running custom jobs at scale, it’s even more important to monitor whether each execution completed successfully and to catch and investigate unexpected behavior before it causes issues.
Tracking Elastic job and SQL Agent job problems
SQL jobs, whether SQL Agent Jobs or Azure Elastic Jobs, are often treated as a standard, “set-and-forget” way to schedule routine tasks across the database estate. However, without proper visibility, it’s difficult to track every job execution across all environments, especially if that means switching between multiple portals or managing separate monitoring tools.
Redgate Monitor simplifies this by letting you track both Elastic Jobs and SQL Agent Jobs side-by-side from a single, consolidated dashboard. You can also configure alerting preferences once and apply them consistently across both job types (covered later in this article).
To monitor Azure Elastic Jobs, simply add the job database as a monitored server (see Adding an Azure SQL Database). Redgate Monitor will then start collecting job definitions, execution history, and step-level output directly from this database, and display the results alongside SQL Agent job data on the Estate > Jobs page.
This makes it very easy to review recent job activity and outcomes, including:
- Which jobs succeeded, or failed
- When a job last executed, when it is scheduled to run again, and duration of last run
- Step-level details for a failed job, including error messages or last step output
Raising alerts
Redgate Monitor will also send real-time alerts whenever it detects something isn’t quite right with your scheduled jobs. Alerts can be sent via email, Slack, SNMP, or webhook, and are easy to set up through the alert configuration settings.
Failed job alerts
One obvious requirement is that you want to be notified immediately if a job doesn’t complete successfully, whether due to failure or cancellation. When this happens, Redgate Monitor will raise the Job Failure alert, providing full context of what job failed and when, including error messages and last step output, where available.
Job duration unusual alerts
What if an Elastic job runs on schedule and executes successfully, but has started taking a lot longer than usual to complete? Or suddenly finishes suspiciously fast? This could be caused by high system load, a sub-optimal SQL execution plan, or some other underlying issue that needs investigation.
While you can view job durations in the Azure portal, there’s no built-in way to spot these performance anomalies. With Redgate Monitor, you can use the Job Duration Unusual alert. After ten executions of the job, it establishes a baseline of what “normal” looks like for that job, and from then on, it will alert you to deviations, even if the job is still executing. That way, you can catch problems early, before jobs slip their scheduled windows, cause contention and system slowdowns, or simply time out.
Summary
With support for Azure Elastic Jobs alongside SQL Agent jobs, Redgate Monitor now makes it much easier to keep scheduled tasks running smoothly across your entire SQL Server estate, on-premises and in Azure.
From a single dashboard, it keeps you up-to-date with the outcome of all scheduled jobs and will alert you immediately both to failed jobs and to jobs that suddenly deviate from their normal performance. By catching issues early, you can optimize jobs and adjust scheduling before problems escalate and start affecting wider business operations.
To find out more, you can see Job monitoring in action on the Redgate Monitor online demo, read the Jobs section of the documentation, or visit the Redgate Monitor product page.
Read next
Product learning article
Improving the Quality of your Database Monitoring
Database monitoring should be as simple as possible, and yet still allow the users to drill into sufficient detail to be able to recommend a fix to the problem. The trick is to adopt a layered or 'tiered' approach.
Tools in this post
Redgate Monitor
Real-time multi-platform performance monitoring, with alerts and diagnostics