How is MaximumErrorCount Calculated

  • Can anyone tell me how the errors are counted for MaximumErrorCount? Specifically, I have three sequence containers, each with several tasks, inside a sequence container. I have set the MaximumErrorCount for each of the inside containers to 1 more than the acceptable number of errors. I set the MaximumErrorCount for the outside container to 0 since none of the inside containers can be allowed to fail without failing the job.

    Now, I do have several tasks fail, but none of the containers fail. However, the outside container fails, and in turn the package and SQL agent job, because the maximum error count has been reached. Are all errors within a container, even if they're inside another container, counted against the MaximumErrorCount for that container?

    If each of my three inside containers has a MaximumErrorCount of 3, should my outside container have a value of 9?

    Tim

  • The outside container will fail if the inside containers error counts add up to it's maximum error count. So in your example if you wanted it to be ok to have all three inner containers have three errors each, your outside container will have to have a max of at least nine. Since your example wants the package to fail if the error count in one of the sub containers reaches four, just set the inner most containers to a max of three and the package and outer container to 100.

    Basically, you have to set the maximum number of errors at the container in which you really want to fail and make everything else a higher total count. Set the outer containers to fail or not fail on an inner container failure appropriately and use the error handler tab to take appropriate actions on your failures.

    I have used SSIS extensively on a lot of different types of projects and have had very little cause to use this functionality extensively. I am tempted to say you are probably going down the wrong path in how you are trying to handle your errors. Perhaps you could post what you are trying to do and I or someone smarter than I am may be able to suggest a simpler alternative.

    If you really do have to mess with these settings, I would suggest an annotation in your package control flow indicating you have done this or someone troubleshooting an issue a year from now will be pulling out their hair wondering why the pacage is not failing.

  • Thanks for the advice. I've never used them since any kind of a failure has always been an issue that had to be addressed. I've just started working on a package in which several failures in certain areas are perfectly acceptable and these seemed to be getting in the way. However, if it won't hurt anything just to jack them way up, then I'll do that; the remainder of the package will handle any 'real' errors.

    Tim

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply