在SSIS中的文件系统任务之后分支,而不会使程序包失败 [英] Branching after a file system task in SSIS without failing the package

查看:98
本文介绍了在SSIS中的文件系统任务之后分支,而不会使程序包失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果重命名等文件系统任务失败,例如,如果该文件不存在,那么这被SSIS认为是错误。这意味着整个包装失败。我可以通过使用脚本任务来绕过它,或者将包的最大错误设置为多个。将程序包的最大错误设置为多于一个的问题是,如果程序包中的其他位置发生错误,程序包将不会失败。

If a file system task such as a rename fails, for example if the file does not exist, then this is considered an error by SSIS. This means the whole package fails. I can get around it by using a script task, or setting the maximum errors for the package to more than one. The problem with setting maximum errors for the package to more than one is that if an error occurs somewhere else in the package the package won't fail when it should.

所以有什么办法以某种方式吞下错误,还能够根据文件系统任务的成功或失败分支吗?我尝试将文件任务粘贴到一个使用ForceExecutionResult设置为Success的序列容器中,但该包仍然失败,表示达到了最大错误数。

So is there any way to somehow swallow the error and still be able to branch based on success or failure of the file system task? I tried sticking the file task into a sequence container with ForceExecutionResult set to Success, but the package still fails saying maximum error count reached.

推荐答案

p>我遇到这个确切的问题,我一直使用脚本任务。我不认为有更好的解决方案。

I've run into this exact problem and I've always used a Script Task. I don't think there's a better solution.

这篇关于在SSIS中的文件系统任务之后分支,而不会使程序包失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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