SSIS Allow task to crash but package succeeds?

Is there a way to resolve the script task failure, but the result of the package is based only on the results of other tasks? For example, I have 5 tasks. I don't care what the outcome of task 2 is, but if any of the others fail, I want the package to fail. Otherwise, I want this to succeed ...

Is it possible?

+6
ssis
source share
2 answers

Try setting FailPackageOnFailure to False in the task properties.

The following option will not crash your tasks, but may work for you: Try wrapping your code in a try catch and use it finally to set Success for 2 tasks that you don't need.

try { // Do work here } catch { // log errors here } finally { Dts.TaskResult = (int)ScriptResults.Success; } 
+4
source share

In addition to setting FailPackageOnFailure in the task, you must also set MaximumErrorCount in the package itself to something greater than 1. The task will still increase the number of packet errors, and if the number of errors exceeds MaximumErrorCount , then the package may / may still not work.

+5
source share

All Articles