SSIS 多循环传播不起作用 [英] SSIS Multiple Loops propagate not working

查看:34
本文介绍了SSIS 多循环传播不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 SSIS 包尝试遍历人员列表(在表格中),然后向这些人员发送报告列表.

My SSIS package attempts to loop through a list of people (in a table) then sends those people a list of reports.

如果没有生成其中一份报告(excel 文件),我希望该包不会失败,而是继续.

If one of those reports are not generated (excel files) I would like the package not to fail but to continue.

我已经阅读了几篇关于将传播值设置为false"的文章,这应该意味着错误不会冒泡到包含循环中.

I have read several articles on setting the propagate value to "false" which should mean the error does not bubble up to the containing loop.

它仍然如此:(

我已将发送电子邮件任务"上的最大错误设置为 0,并添加了一个错误事件,并将传播值设置为false"

I have set the maximum error to 0 on the "Send Email Task" and added an Error event with the propagate value set to "false"

事件失败,但上述循环也失败,因此包也失败.

The event fails but also fails the above loop and therefore the package.

我什至添加了一个序列容器,看看是否有帮助!没有快乐:(

I even added a sequence container to see if that would help! No joy :(

我让它工作的唯一方法是将所有循环的最大错误计数设置为 0,这似乎是错误的.

The only way I can get it to work is by setting the Maximum error count on all loops to 0 which seems wrong.

推荐答案

容器的最大错误计数"会忽略在子项上设置的任何传播设置.它允许您定义在容器本身失败之前允许在任何子项中发生的错误数.这里的想法是,您可能会遇到这样一种情况:您希望父项仅在超过 10 个子项失败时才失败,而不管它们在哪里失败.

The "max error count" of a container ignores any propagation settings set on child items. It lets you define the number of errors that are allowed to occur in any child item before the container itself fails. The idea here is that you may have a situation where you want the parent to fail only if more than say, 10 child items fail, irrespective of where they fail.

如果您想防止这种情况发生,您需要将计数更改为 0,这会关闭此检查,并允许您的子项根据需要多次失败.

If you want to prevent this from occuring, you need to change the count to 0, which turns off this check, and allows your child items to fail as many times as you like.

就您而言,无论有多少子项失败,您都希望循环始终继续.

In your case, you want the loop to always continue no matter how many child items fail.

  1. 将邮件任务设置为在任务失败时使父级失败.
  2. 更改容器对象上的设置,使最大错误计数为零,并将此任务失败时父项失败"设置为 true.
  1. Set the mail task to not fail the parent when the task fails.
  2. Change the settings on the container objects to have the max error count to zero, and "fail parent when this task fails" to true.

一旦这些被设置,邮件任务将失败,但循环将继续.如果流程中的另一个项目失败,错误传播将使链上的父组失败.

Once these are set, the mail task will fail but the loop will continue. If another item in your flow fails, error propagation will fail the parent group up the chain.

这篇关于SSIS 多循环传播不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆