我正在使用SSIS 2005来使用一些SFTPtasks WinSCP.我用Google搜索了错误,但无法使其正常工作.我收到了这个错误:
[执行进程任务]错误:执行"C:\ Program Files\WinSCP\WinSCP.exe""-script = C:\ Documents and Settings \nian_z\Desktop\temp\SSISMovingSOA\removeSOA8.txt"at"C:\ Program Files\WinSCP",进程退出代码为"1",而预期为"0".
这是我使用的WinSCP脚本:
option batch abort
option confirm off
#open sftp://user:password@server:22
#cd /m/vo/Cont/fileftp
get OrderOutbound*
close
exit
Run Code Online (Sandbox Code Playgroud)
对于上面的脚本,我甚至尝试一次只留下一个语句,但仍然有错误.
以下是执行流程任务的设置.

小智 5
这不是答案,而是试图帮助您找到问题的解决方案.
请尝试以下步骤以确定您的脚本是否实际在SSIS之外工作.
Windows Start并单击Run... cmd以打开命令提示符.cd"C:\ Program Files(x86)\ WinSCP"
removeSOA8.txt位于C:\Documents and Settings\userid\Desktop\temp\SSISMovingSOA\带空格的路径中,则通过将脚本路径括在双引号中以运行脚本并使用该/log选项捕获所有状态消息来键入以下命令.WinSCP.exe"/ script = C:\ Documents and Settings\userid\Desktop\temp\SSISMovingSOA\removeSOA8.txt"/log=C:\temp\WinSCP_log.txt
脚本执行后,您将发现WinSCP_log.txt将在路径中创建一个名为的日志文件C:\temp.通读文件以确定是否有任何错误消息.
我尝试使用WinSCP从FTP下载文件,其中包含以下脚本:
option batch abort
option confirm off
open ftp://myuserid:mypassword@ftp.myftpsite.com:21 -passive=on
cd /root/somefolder/
option transfer binary
get SomeFileOnFTP.txt c:\temp\
close
exit
Run Code Online (Sandbox Code Playgroud)
以下是我Execute Process Task在SSIS包中配置的设置.

该过程在BIDS中成功运行.

希望能给你一个想法.
| 归档时间: |
|
| 查看次数: |
16443 次 |
| 最近记录: |