title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | monikerRange | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
View Job Activity |
View Job Activity |
markingmyname |
maghan |
01/19/2017 |
sql |
ssms |
how-to |
|
= azuresqldb-mi-current || >= sql-server-2016 |
[!INCLUDE SQL Server SQL MI]
Important
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
This topic describes how to view the runtime state of [!INCLUDEssNoVersion] Agent jobs in [!INCLUDEssnoversion] by using SQL Server Management Studio or [!INCLUDEtsql].
When the [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent service starts, a new session is created and the sysjobactivity table in the msdb database is populated with all the existing defined jobs. This table records current job activity and status. You can use the Job Activity Monitor in [!INCLUDEssNoVersion] Agent to view the current state of jobs. If the [!INCLUDEssNoVersion] Agent service unexpectedly terminates, you can refer to the sysjobactivity table to see which jobs were being executed when the service terminated.
For detailed information, see Implement SQL Server Agent Security.
-
In Object Explorer, connect to an instance of the [!INCLUDEssDEnoversion], and then expand that instance.
-
Expand SQL Server Agent.
-
Right-click Job Activity Monitor and click View Job Activity.
-
In the Job Activity Monitor, you can view details about each job that is defined for this server.
-
Right-click a job to start it, stop it, enable or disable it, refresh its status as displayed in the Job Activity Monitor, delete it, or view its history or properties. To start, stop, enable or disable, or refresh multiple jobs, select multiple rows in the Job Activity Monitor, and right-click your selection.
-
To update the Job Activity Monitor, click Refresh. To view fewer rows, click Filter and enter filter parameters.
-
In Object Explorer, connect to an instance of [!INCLUDEssDE].
-
On the Standard bar, click New Query.
-
Copy and paste the following example into the query window and click Execute.
-- lists activity for all jobs that the current user has permission to view. USE msdb ; GO EXEC dbo.sp_help_jobactivity ; GO
For more information, see sp_help_jobactivity (Transact-SQL).