January 15, 2012 at 5:49 am
Hi,
I'm looking for a way to force a job to indicate successful. Here's the deal; I run a sql routine hourly to test for jobs that failed. If any fail, it sends an email to our team and continues to send an email hourly.
After investigating a failed job, I know why it failed and the reason is 3rd party data, which is not available today. So at that point, I need to force the job as successful so that it doesn't continue to send emails. Does anyone have any sql code that would force that result?
For now, I manually create a new dummy step (last step) in the job, like say select getdate() and then execute that step, which will force the job to be successful.
Thanks for any ideas on this,
Paul
January 15, 2012 at 6:08 am
As far as i know, there is no any way to force the job success. maybe you have to do it by your logical side.
January 15, 2012 at 7:16 am
I think you could wrap the original call into a TRY ... CATCH block and don't raise an error at the CATCH section.
January 15, 2012 at 7:24 am
I also using same to get rid of repeated notification.
January 16, 2012 at 3:23 am
Paul Bukowski (1/15/2012)
For now, I manually create a new dummy step (last step) in the job, like say select getdate() and then execute that step, which will force the job to be successful.
It works, but it's not a "clean" technique. Be sure to document it properly.
My vote goes to TRY/CATCH.
-- Gianluca Sartori
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply