I would like to setup alerts from within the maintenance plans. When you setup a notification from the Agent Job it sends out the Job name, duration, status, message.

If I add a Notify Operator Task it want's a subject and body. Will it still include the above information?

If not how can I have this information included?

1 Answer 1


Since the Maintenance Plan uses EXECUTE msdb.dbo.sp_notify_operator @name=N'some operator',@subject=N'some subject',@body=N'some body' there is no way to automatically include details about the Job Name, duration, status, etc. You could add a "on failure" precedence constraint that only executes the Notify Operator Task when a step in the maintenance plan fails. You could hard-code the Notify Operator Task with a specific message indicating the piece of the maintenance plan that failed. This will get pretty odious very fast, and still doesn't allow automating the error message you receive via email. This looks like:

enter image description here

Having said that, instead of using the built-in Maintenance Plans feature, you may want to look into Ola Hallengren's scripts that are built for this purpose, and offer a far wider range of options. You could then use standard Agent notification for the maintenance plan the way you do for other jobs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.