SSIS - 第二个脚本任务未在 Foreach 循环容器中执行

SSIS - 2nd Script Task not being executed in Foreach Loop Container

我在 SSIS 包中的 foreach 循环容器中有 2 个脚本任务。见图片。第一个脚本任务 Determine which file is presented 执行得很好。但是,第二个 Archive Broker File 根本没有执行。

我可以在进度中看到脚本任务得到验证但根本没有执行。它唯一需要做的就是重命名文件并将其移动到不同的位置。

知道发生了什么,特别是因为第一个脚本任务没有任何问题地执行了。

谢谢, 丹尼尔

原因

如果没有执行三个数据流任务,则不会执行,因为您使用的是优先约束(link between tasks) with 逻辑与 条件

解决方案

双击从任何数据流任务到脚本任务的任何优先约束,并将条件更改为逻辑或

来自官方文档的信息

基于Precedence Constraints official documentation

Logical AND
Select to specify that multiple precedence constraints on the same executable must be evaluated together. All constraints must evaluate to True.

This type of precedence constraint appears as a solid green, highlighted or blue line.

Logical OR
Select to specify that multiple precedence constraints on the same executable must be evaluated together. At least one constraint must evaluate to True.

This type of precedence constraint appears as a dotted green, highlighted, or blue line.


其他有帮助的文章

您可以在以下文章中阅读有关优先约束的更多信息: