Notification when sql agent is stopped

  • Is there a way in SQL server that if SQL server agent stopped, then send DBA a message?

    In alert or somewhere easy to setup?

    Thanks

  • I don't think there is from within SQL itself, but you could write a WMI query which polls the service and sends an email out when its stopped.

    something along the lines of

    SELECT Started FROM Win32_Service WHERE Name = 'SQLSERVERAGENT'

    Returns True or False so if 0 then send email etc

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply