Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 4.53 KB

File metadata and controls

69 lines (53 loc) · 4.53 KB
title Monitor Job Activity
ms.custom seo-lt-2019
ms.date 01/19/2017
ms.prod sql
ms.prod_service sql-tools
ms.technology ssms
ms.topic conceptual
helpviewer_keywords
SQL Server Agent, monitoring
jobs [SQL Server Agent], monitoring
monitoring [SQL Server], jobs
activity monitoring [SQL Server Agent]
monitoring [SQL Server], SQL Server Agent
monitoring [SQL Server Agent]
SQL Server Agent Job Activity Monitor
SQL Server Agent jobs, monitoring
performance [SQL Server], jobs
current activity
ms.assetid 71cb432b-631d-4b8b-9965-e731b3d8266d
author markingmyname
ms.author maghan
ms.manager jroth
ms.reviewer
monikerRange = azuresqldb-mi-current || >= sql-server-2016 || = sqlallproducts-allversions

Monitor Job Activity

[!INCLUDEappliesto-ss-asdbmi-xxxx-xxx-md]

Important

On Azure SQL Database Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Database Managed Instance T-SQL differences from SQL Server for details.

You can monitor the current activity of all defined jobs on an instance of [!INCLUDEssNoVersion] by using [!INCLUDEssNoVersion] Agent Job Activity Monitor.

SQL Server Agent Sessions

[!INCLUDEssNoVersion] Agent creates a new session each time the service starts. When a new session is created, the sysjobactivity table in the msdb database is populated with all the existing defined jobs. This table preserves the last activity for jobs when [!INCLUDEssNoVersion] Agent is restarted. Each session records [!INCLUDEssNoVersion] Agent normal job activity from the start of the job to its finish. Information about these sessions is stored in the syssessions table of the msdb database.

Job Activity Monitor

The Job Activity Monitor allows you to view the sysjobactivity table by using [!INCLUDEssManStudioFull]. You can view all jobs on the server, or you can define filters to limit the number of jobs displayed. You can also sort the job information by clicking on a column heading in the Agent Job Activity grid. For example, when you select the Last Run column heading, you can view the jobs in the order that they were last run. Clicking the column heading again toggles the jobs in ascending and descending order based on their last run date.

Using the Job Activity Monitor you can perform the following tasks:

  • Start and stop jobs.

  • View job properties.

  • View the history for a specific job.

  • Refresh the information in the Agent Job Activity grid manually or set an automatic refresh interval by clicking View refresh settings.

Use the Job Activity Monitor when you want to find out what jobs are scheduled to run, the last outcome of jobs that have run during the current session, and to find out which jobs are currently running or idle. If the [!INCLUDEssNoVersion] Agent service fails unexpectedly, you can determine which jobs were in the middle of being executed by looking at the previous session in the Job Activity Monitor.

To open the Job Activity Monitor, expand SQL Server Agent in [!INCLUDEssManStudio] Object Explorer, right-click Job Activity Monitor, and click View Job Activity.

You can also view job activity for the current session by using the stored procedure sp_help_jobactivity.

Related Tasks

Description Topic
Describes how to view the runtime state of [!INCLUDEssNoVersion] Agent jobs. View Job Activity

See Also

View Job Activity
sysjobactivity (Transact-SQL)
syssessions (Transact-SQL)
sp_help_jobactivity (Transact-SQL)