views:

24

answers:

1

Can I (How do I) configure Sql Server 2008 to notify an operator if any step in the Job fails?

I have a Sql Server job with several steps to update data from multiple different sources, followed by one final step which performs several calculations on the data. All of the "data refresh" steps are set to "Go to next step on failure". Generally speaking, if one of the data refreshes fails, I still want the final step to run, but I still want to be notified about the intermediate failures, so if they fail consistantly, I can investigate.

A: 

Go to Job Properties > Notification tab > action to perform when the job completes

under that check the Email checkbox and select "When the job fails" from the dropdown and save the job.

Read 4th point on http://msdn.microsoft.com/en-us/library/ms191130.aspx

If you want to notify an operator by e-mail, check E-mail, select an operator from the list, and then select one of the following:

  • When the job succeeds: to notify the operator when the job completes successfully.

  • When the job fails: to notify the operator when the job completes unsuccessfully.

  • When the job completes: to notify the operator regardless of completion status.

Aamod Thakur
Unfortunately, this does not solve the problem. First, this will email upon completion, regardless of success or failure. I would expect to see emails only if a step failed. -- Also, the completion email does not include any text indicating an individual step failed. It simply states "The job succeeded." How can I know that a specific step failed.
Matt Murrell
use this option "When the job fails" to notify the operator when the job completes unsuccessfully.It means you wil get notified if the job completed with any failed steps(it will complete the job even if any step fails as on error go to next step was specified for the job steps). then you can view job history for further details.. what say!
Aamod Thakur
The option for "When the job fails" does not send an email because the last step succeeded (aka "Quit the job reporting success")
Matt Murrell

related questions