cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Server SQL Agent Alert - Monitor SQL Agent

Description

This alert uses the external stored procedure named xp_servicecontrol which is not supported. See this custom alert for an alternative: Monitor SQL Server Agent - No XP Proc

This alert will run against the monitored instance and determine if the SQL Agent is Started or Stopped.  If Stopped, this alert will fire and send the appropriate emails. The alert can be created in Ignite by clicking on Alerts > Manage Alerts and creating a custom alert of type Custom SQL Alert - Single Boolean Return.

SQL Statement

CREATE TABLE #status (status VARCHAR(50))

INSERT #status EXEC master..xp_servicecontrol 'querystate','SQLServerAGENT'

SELECT CASE status WHEN 'Started' THEN 'TRUE' ELSE 'FALSE' END FROM #status

DROP TABLE #status

Alert Definition

Monitor SQL Agent.jpg

Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎01-07-2015 04:28 AM
Updated by: