Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 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.

share|improve this answer
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. –  Thomas Stringer Mar 21 '12 at 13:12
    
Yes, I stand corrected. –  yogirk Mar 21 '12 at 13:14
add comment

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)

share|improve this answer
    
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? –  Richard Banks Mar 21 '12 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. –  Thomas Stringer Mar 21 '12 at 14:57
1  
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 –  Richard Banks Mar 21 '12 at 16:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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