How to notify when SQL Server Agent stopped automatically?

  • Hello all,

    I have many jobs running and for some reason sql server agents stops automatically not sure why..Can someone tell me how can we send email or notify users when my sql sevrer agent stops automatically, i have my dbmail configured...

    Thanks,

  • You need to monitor the SQL Server Agent service at OS level using something like SCOM.

    John

  • Could also write something in powershell as well to check the process state and send an email should it change from started to stopped

  • Anthony,

    Can you provide me the script and the procedure to do this?

  • use the Get-Service cmdlet, for the service in question, then google for a smtp powershell function and build it up that way,

    if you get stuck come back with your script so far and I will see where your going wrong.

  • hi,

    you can create bat file which will send mail to you whenever sql server agent service get stopped.

    go to run-->services.msc-->sql server agent service -->property-->recovery option

    ---->run program

  • i am also looking for the solution

    Hi Can you please mention in detailed for me run program is disabled to for the agent service

    Thanks in advance

  • Hi Friends i found the below Link

    http://sqlish.com/alert-when-sql-server-agent-service-stops-or-fails/

    Thanks

Viewing 8 posts - 1 through 7 (of 7 total)

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