SSIS 文件系统任务不工作但报告成功

发布于 2025-01-09 23:46:20 字数 927 浏览 0 评论 0原文

我创建了一个 SSIS 包,它从 .zip 文件中提取两个文件,从中导入数据,然后尝试删除提取的文件。

该包有效,数据已导入,所有任务均报告成功。但是,尝试删除文件的文件系统任务不会删除它们,即使它们报告成功。 我使用 CozyRoc Zip Task 来提取文件。当我删除 Zip 任务时,文件系统任务实际上执行删除文件。我不确定 CozyRoc 是否导致了该问题,但该任务的存在可能会导致该包出现其他问题。

  • 谁能帮我弄清楚如何可靠地删除文件?
  • 我是否需要在数据流任务之后进行某种暂停,以允许它们释放对文件可能拥有的任何锁定?
  • 有没有办法查看文件系统任务在运行时使用的 DOS 命令,以验证它们是否确实尝试删除正确的文件?

谢谢你, Robbie

控制流:

控制流

详细信息:

  • Visual Studio 2019 v16.11.3
  • 文件名来自平面文件连接管理器(参见下图)。
  • 平面文件连接管理器使用表达式来设置其连接字符串。
  • 相同的连接管理器用于导入数据,因此我认为它们准确地引用了正确的文件及其正确的位置。

用于删除任务之一的文件系统任务编辑器:

文件系统任务编辑器

I created an SSIS package that extracts two files from a .zip file, imports data from them and then attempts to delete the files that were extracted.

The package works, data is imported and all tasks report success. However the File System Tasks that attempt to delete the files don't delete them, even though they report success.
I use the CozyRoc Zip Task to extract the files. When I remove the Zip Task, the File System Tasks actually do delete the files. I'm not certain that CozyRoc is causing the problem, but the existence of that task may be causing other issues with the package.

  • Can anyone help me figure out how to reliably delete the files?
  • Do I need to put in some sort of pause after the Data Flow Tasks to allow them to release whatever locks they might have on the files?
  • Is there a way to view the DOS commands that the File System tasks use at run time, to verify that they are actually attempting to delete the correct files?

Thank You,
Robbie

Control Flow:

Control Flow

Details:

  • Visual Studio 2019 v16.11.3
  • File Names are from Flat File Connection Managers (See image below).
  • Flat File Connection Managers use Expressions to set their connection strings.
  • The same connection managers are used to import the data, so I presume that they accurately refer to the correct files and their correct locations.

File System Task Editor for one of the delete tasks:

File System Task Editor

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文