2

Currently we are having problems with our backups, specifically disk space issues. On investigation it seems the notification mail isn't being sent when the job fails. This is a weird issue as a notification mail is sent when the job completes successfully.

Any ideas why this would be? We are using SQL Server 2008.

2 Answers 2

2

Open your job in the management studio and go to the backup step properties and check whether it looks like this

enter image description here

I suspect "On failure action" Is not setup properly.

2
  • 1
    I don't think that is what is causing the problem. The above screenshot is just how you handle step execution flow on success/failure. This isn't where you'd configure notifications to an operator. Mar 21, 2012 at 13:12
  • Yes, I stand corrected.
    – RK Kuppala
    Mar 21, 2012 at 13:14
2

What is most likely the issue is that you have it set to notify you by email when the job has success.

Go into your Job Properties and click on the left hand side Notifications. I'm guessing you'll find somethin glike this:

enter image description here

See how it says When the job succeeds? If you want a notification for either result, set that to When the job completes. (or When the job fails if you just want to know when it fails)

3
  • Thanks for the answer. We have a notify operator task in the maintenance plan for the failure and success that the job runs. Are you saying that we need to set this up as well? Mar 21, 2012 at 14:35
  • @RichardBanks That should be fine, I misread your question thinking you did the backup through a single Agent Job. Query the msdb.dbo.sysmail_event_log view and see if you're getting any errors when sending the mail. I doubt, as I'd assume you're using the same profile/account. But worth looking into. Mar 21, 2012 at 14:57
  • 2
    think i found the problem. My failure notification task had mutliple branches attached. I just needed to set the notifiy task to a logical or. Thanks for your help Mar 21, 2012 at 16:12

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.