SSIS 执行进程任务不写文件 [英] SSIS Execute Process task does not write files

查看:32
本文介绍了SSIS 执行进程任务不写文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我有一个用 C# 编写的自定义 EXE(我没有写).它从 MongoDB 检索数据并将六个 CSV 文件写入它所在的同一文件夹.

  • I have a custom EXE written in C# (I didn't write it). It retrieves data from MongoDB and writes six CSV files to the same folder that it resides in.

我可以双击 EXE 并运行它——我确实需要以管理员身份运行它.我在属性中设置了它的管理员权限,所以它总是以管理员身份运行.它会弹出一个包含一些状态消息的窗口,然后在创建文件后关闭而不提示.

I can double-click on the EXE and run it -- I do need to run it as an administrator. I have its administrator privileges set in the properties, so it always runs as administrator. It pops up a window with some status messages, then closes without prompting after creating the files.

我在 SSIS 的执行进程"任务中列出了相同的 EXE(VS 2015,指向 SQL Server 2012).当我运行它时,它会弹出相同的 cmd 窗口,给出相同的状态消息,在没有提示的情况下关闭,然后继续我的 SSIS 包中的下一步......但它不写入任何文件.

I have the same EXE listed in an "Execute Process" task in SSIS (VS 2015, pointed to SQL Server 2012). When I run it, it pops up the same cmd window, gives the same status messages, closes without prompting, and continues to the next step in my SSIS package... BUT it doesn't write any files.

我给了目标文件夹的所有人"权限,这似乎没有帮助.我需要做什么?

I gave "Everyone" permissions to the target folder, which doesn't seem to have helped. What do I need to do?

推荐答案

当进程从 SSIS 启动时,它与可执行文件不在同一个文件夹中运行.这是执行外部进程的任何软件的典型情况.

When the process is launched from SSIS, it's not being run from the same folder as the executable. That's pretty typically of any software executing an external process.

幸运的是,您可以在执行流程"任务属性中设置工作文件夹"选项.如果您的可执行文件被写入当前文件夹,它应该可以工作.

Fortunately, you can set the "working folder" option within the Execute Process task properties. If your executable is written to write to the current folder, it should work.

这篇关于SSIS 执行进程任务不写文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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