为什么当 SSIS 序列容器失败时我的失败流程不会启动?
我有一些 SSIS 序列容器,如果其中的任何任务失败,我希望将流程定向到清理所有内容的 SQL 任务,以便我可以解决问题并再次运行它,而不会产生重复的数据。我的问题是,即使序列容器之一发生故障,我也无法将流程定向到 SQL 任务。似乎这应该是默认行为,但一定有一些我缺少的设置。我尝试设置 FailParentOnFailure,但这只是阻止包的其余部分运行。我会插入一张图像来帮助理解我所设置的内容,但我猜我的声誉还不够好。 :P
I have some SSIS sequence containers, and if any of the tasks in them fail I want to direct the flow to a SQL task that cleans everything up so I can address the issue and run it again without having duplicate data. My problem is that I can't get the flow directed into the SQL task even when something in one of the sequence containers fails. Seems like this should be the default behavior, but there must be some setting I'm mising. I played with setting FailParentOnFailure, but all this does is stops the rest of the package from running. I would insert an image to help with understanding what I have set up, but guess my reputation isn't good enough yet. :P
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为在这绝对是一个例子,一张图片可以帮助其他人回答我的问题。我有 3 个序列容器,如果它们失败,它们都指向同一个 SQL 任务。我希望在任何序列容器出现错误时运行 SQL 任务,因此必须将优先级约束设置为逻辑 OR,否则它将永远不会运行,除非所有 3 个容器都失败。将其更改为 OR,它就像我想要的那样工作。
I think in this definitely one instance where a picture would have helped others answer my question. I had 3 sequence containers all pointed to the same SQL task if they failed. I wanted the SQL task to run if ANY of the sequence containers had an error, so the precedence constraints had to be set to a logical OR, otherwise it would never run unless all 3 happened to fail. Changed it to OR and it worked just like I wanted.
确保单击“约束”上的“编辑”,并将“多个约束”的最后部分更改为“或”,以便在其中任何一个失败时执行该任务,否则将等待所有约束都失败。
Make sure that you click Edit on the Constraints and change the last portion for Multiple Constraints to OR so that if any of them fail they execute the task, otherwise it will wait for all of them to fail.
检查序列容器属性,如果 FailPackageOnFailure=true,则不会触发“失败优先约束”。
Check the sequence container property if FailPackageOnFailure=true it will not fire "failure precedence constraint".
如果没有有关序列容器的更多详细信息,则很难确定问题所在。
我会尝试检查容器的
Propagate
系统变量。每当您的任务可能失败并且您不希望整个程序包停止时,请确保执行以下操作之一:
Event Handlers
并在OnError
上执行某些操作> 活动至处理失败或
Propagate
系统变量设置为False
我会提供一些屏幕截图,但我没有足够的代表。相反,我给您留下了一些链接,其中包含有关此主题的更多信息:
与您的问题类似:http://sqlserverselect.blogspot.com/2010/12/ssis-foreach-loop-container-continue-on.html
有关事件传播的详细信息: http://simonworth.wordpress.com/2009/ 11/11/ssis-事件处理程序-变量-传播/
Without more details on your Sequence Containers it is hard to be sure about the problem.
I would try to check the
Propagate
system variable of your containers.Whenever you have a task that can fail and you dont want your whole package to stop, make sure you do one of the following:
Event Handlers
and do something on theOnError
event totreat the failure or
Propagate
System Variable of that task toFalse
I would provide some screenshots, but i do not have enough rep for that. Instead i leave you with some links with more information about this subject:
Similar to your question: http://sqlserverselect.blogspot.com/2010/12/ssis-foreach-loop-container-continue-on.html
Detailed info about event propagation: http://simonworth.wordpress.com/2009/11/11/ssis-event-handler-variables-propagate/