E-mail Operator only on Maintenance Plan Failure

SeanFromIT picture SeanFromIT · Mar 14, 2011 · Viewed 8k times · Source

I know you can use Reporting and Logging wizard to setup a report e-mail for a maintenance plan, but is there a way to only send this out if there was a failure? I'm interested in receiving emails on errors for Back Up Database and Check Database Integrity Tasks in a maintenance plan.

Answer

DForck42 picture DForck42 · Mar 14, 2011

right-click the sql agent job, click properties, go to notifications. Set up an operator witht he appropriate email and then select email, select the operator, and then when the job fails. click ok and you should be good to go. note that this solution will only take care of one sql server agent job (each sub plan for a maintenance plan). so you'll have to set up the notification on each part of the subplan (if you have multiple subplans).

How to create an operator.