如何使用ssis任务解压缩远程服务器中的rar文件 [英] how to unzip rar files which are in remote server using ssis task

查看:86
本文介绍了如何使用ssis任务解压缩远程服务器中的rar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网络文件夹中有 .rar 文件,我需要解压缩 rar 文件并将其作为 .bak 文件存储到远程服务器中.我使用了执行流程任务并传递了表达式,但是当我执行任务时出现错误,因为流程退出代码为2"而预期为0".

我在谷歌上搜索了错误,但没有找到解决方法.请任何人都可以建议我如何做到这一点.

下面是我用过的表达

可执行文件:C:\Program Files\7-Zip\7z.exe

参数 : x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o\\SDL-VR-DBSBACKUP\F:\Monthly bak files\CustomerDB306_p_2015_08_31_2016

谢谢.

解决方案

7zip,错误代码 2 表示致命错误".您可能需要将输出文件用引号括起来,因为它包含空格.测试它的一个好方法是从命令行手动运行它并确保它正常工作,一旦您对结果感到满意,您就可以从 SSIS 任务中尝试它.:

"C:\Program Files\7-Zip\7z.exe" x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o"\\SDL-VR-DBSBACKUP\F:\Monthly文件\CustomerDB_backup_2015_08_31_203001_4545366"

I have .rar files in network folder and I need to unzip rar files and store as .bak files into remote server. I have used execute process task and passed expressions but when I am executing task getting error as The process exit code was "2" while the expected was "0".

I have googled the error but did not find how to fix this. Please can anyone suggest me how to do this.

Below are the expressions I used

Executable : C:\Program Files\7-Zip\7z.exe

Arguments : x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o\\SDL-VR-DBSBACKUP\F:\Monthly bak files\CustomerDB_backup_2015_08_31_203001_4545366

Thanks.

解决方案

7zip, error code 2 means 'fatal error'. You may need to wrap the output file in quotation marks because it contains spaces. A good way to test it is running it from the command line manually and make sure it works, once you are happy with the result you can try it from a SSIS task.:

"C:\Program Files\7-Zip\7z.exe" x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o"\\SDL-VR-DBSBACKUP\F:\Monthly bak files\CustomerDB_backup_2015_08_31_203001_4545366"

这篇关于如何使用ssis任务解压缩远程服务器中的rar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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