Microsoft Docs

SQL Server Agent Performance Counters

SQL Server Agent is a mission-critical component of SQL Server that performs automated tasks, such as executing jobs, monitoring SQL Server, and sending alerts. Understanding and monitoring its performance is crucial for maintaining the health and efficiency of your SQL Server instance.

This document details the performance counters available for SQL Server Agent, allowing you to track its activity, identify potential bottlenecks, and troubleshoot issues.

Available SQL Server Agent Performance Counters

The following performance counters are grouped by category and provide insights into different aspects of SQL Server Agent's operation:

SQLServer:SQLAgent - General Statistics

These counters provide general information about the SQL Server Agent service.

Counter Name Description
Active Jobs The number of jobs currently running.
Jobs Active On Computer The number of jobs that are currently active on the local computer.
Jobs Canceled The number of jobs that were canceled.
Jobs Completed The number of jobs that have completed successfully.
Jobs Failed The number of jobs that have failed.
Jobs Paused The number of jobs currently in a paused state.
Jobs Running The number of jobs currently running.
Jobs Scheduled The number of jobs that are scheduled to run.
Jobs Step Timeout Rate The rate at which job steps are timing out.
Jobs Timed Out The number of jobs that have timed out.
Job Steps Executed The total number of job steps executed.
Job Step Transitions The number of transitions between job steps.
Total Jobs The total number of jobs configured on the instance.

SQLServer:SQLAgent - Jobs

These counters focus on the execution and status of SQL Server Agent jobs.

Counter Name Description
Job Activity Indicates the status of job activity. A value of 1 means a job is running, 0 means it is not.
Job Success Rate The rate at which jobs are completing successfully.
Job Failure Rate The rate at which jobs are failing.
Job Cancellation Rate The rate at which jobs are being canceled.
Job Timeout Rate The rate at which jobs are timing out.

SQLServer:SQLAgent - Alerts

These counters provide information about SQL Server Agent alerts.

Counter Name Description
Alerts Raised The number of alerts that have been raised.
Alerts Responded To The number of alerts that have triggered a response (e.g., executing a job).
Alerts Ignored The number of alerts that were raised but not responded to.

SQLServer:SQLAgent - Asynchronous Processing

These counters relate to asynchronous operations within SQL Server Agent.

Counter Name Description
Async Operation Queue Size The number of asynchronous operations waiting in the queue.
Async Operations Completed The number of asynchronous operations that have completed.
Async Operation Latency The time taken for asynchronous operations to complete.

How to Monitor SQL Server Agent Performance Counters

You can monitor these performance counters using several tools:

Note: The availability of specific counters may vary slightly depending on your SQL Server version and edition.

Best Practices for Monitoring

Important: Inadequate monitoring of SQL Server Agent can lead to missed backups, outdated reports, and a general lack of awareness about the operational status of your automated tasks, potentially impacting business continuity.