Wednesday, March 7, 2012

Continue after error

I have an SSIS package that uses a for each loop to send an order confirmation e-mail. If it does not find an email I need the package to continue after the failure path. The package stops after the failure, but I need it to continue with the next iteration of the for each loop. How can I do this?

Suppress execution error propagation up the container hierarchy, so that the foreach loop container is unaware of errors in its own executables.

Specifically, set the Propagate system variable to false on an event handler scoped below the foreach loop container. Propagate is a system variable which controls upward execution error propagation.

See the following post for more details on how to set the value of this system variable.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1561849&SiteID=1

Now, for validation errors, which will always bubble up at least one level up the container hierarchy, you'll have to set do something like setting the MaximumErrorCount to a large number on the foreach loop container.

|||

That works for me. Thanks.

No comments:

Post a Comment