Friday, February 24, 2012

DTS Job - Suspend on fail?

Hi,

Is it possible to somehow set a SQL Server DTS job to automatically
disable itself, when it encounters a fail, so that future scheduled
occurrences don't happen until the problem has been fixed?

I've hunted about for this on the web, but drawn a blank unfortunately!

Many thanks if anyone can help at all.One option would be to configure the job step to quit the job when it
succeeds, but if it fails, then to run a second step. In the second
step, you can then use sp_update_job to disable the job entirely.

Simon|||Thank you Simon, that works great.

The only problem I'm having now is that a failure in my child package
doesn't appear to trigger a failure in the parent package, even though
I have 'Fail Package on First Error' set in both - will have to look
into that.

Simon Hayes wrote:
> One option would be to configure the job step to quit the job when it
> succeeds, but if it fails, then to run a second step. In the second
> step, you can then use sp_update_job to disable the job entirely.
> Simon

No comments:

Post a Comment