当其中一个容器失败时,SSIS 包是否失败

Does the SSIS Package fail ,when one of the container failed

我有一个包 1 container.Does ssis pacakge 失败,如果那个容器失败!? 属性

FAIL PACKAGE ON FAILURE is false for the container.

这是否意味着仅当此 属性 设置为 TRUE 时包才会失败,否则只有容器状态失败,而包状态不是!?

这完全取决于包和容器的设置方式。您必须 open/import 它(在 SQL Server Business Intelligence Development Studio 中)和 运行 更好的测试数据以查看哪个失败。这两个容器是否相互依赖?

是的。如果Sequence Container失败,整个包也会失败。提高序列容器的 MaximiumAllowedErrors 属性 以获得您想要的行为。

例子

下面我们有一个示例包。序列容器有一个永远不会成功的任务。

以上,Sequence Container失败,Package失败。下面是上面容器的属性。这些是新容器的默认值。

现在让我们停下来学习。如果我们将包行为与 属性 设置进行比较,这看起来是错误的。此处我们设置了 FailPackageOnFailure=False,但序列容器故障导致包故障。为什么是这样?不直观的属性名称。请参阅 this Microsoft Connect 问题。你并不孤单。微软官方的解释是这样的

Despite some pretty circular previous messages, we believe that the feature is behaving as designed. When you set FailParentOnFailure to false, the parent will not fail until the number of failures in the child exceeds the MaximumAllowedErrors threshold. When you set FailparentOnFailure to true, the parent will fail on the first occurence of an error regardless of the MaximiumAllowedErrors threshold.

从该引用中获取的重要信息是 FailPackageOnFailureMaximiumAllowedErrors 是成对工作的!!!

所以 - 知道这一点 - 我们可以通过将 MaximiumAllowedErrors 计数从 1 提高到 2 来实现预期的行为。

这将允许您有一个失败的序列容器,但不会使整个包失败。

希望对您有所帮助!