Notify when SQL Server Agent Stops

  • Does anyone know of the quickest way to notify me when the SQL Server Agent service stops unexpectedly?

    Regards

    Steve

  • I would just query the SQL Agent status. Poll it every few minutes or so. That's the current setup at my place. THe SQL agent status is polled an dumped into a table. Afterwards agent not running triggers an email alert from the monitoring server.

  • Btw here's the query

    --print 'Start SQLServerAgent Status'

    EXEC master.dbo.xp_servicecontrol 'QUERYSTATE','SQLServerAgent'

  • I would also use the Windows service level options to restart the service and perhaps send an email using a script.

  • That's great.

    Would this have to executed from a different server though?

Viewing 5 posts - 1 through 4 (of 4 total)

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