Emailing the operator

Emailing the operator

Emailing the operator 150 150 Carlos L Chacon

Not sure why I just now stumbled into this but . . . . I learn something new everyday.  🙂

You set up a SQL agent job and want to be notified when it fails, so you click on the Notifications option for your job and select the email option.  NotificationsYou have already set up DatabaseMail–that works, you set up your operator and it is enabled and has a 24×7 schedule (Déjà vu perhaps; know someone else with that schedule?).  You are all set and know you will be notified when the job fails.  The next day you check your job–not because you got an email, but you just want to see the green check mark of success and instead you see the red x of rejection with this in the details–
NOTE: Failed to notify ‘DBA’ via email.

Say what??  It appears there is one additional step.  Right click on SQL Server Agent and click properties.  On the Alert system option, click the Enable mail profile and choose the profile you set up for DatabaseMail.  Restart the SQL agent, and voilà you start getting emails.  Well, hopefully not too many.  🙂

AlertSystems

Imagine what’s possible with a dedicated SQL specialist on your team.

Leave a Reply

Back to top