如何在SQL SERVER 2008中从存储过程创建Zip文件 [英] How to Create Zip file from Stored Procedure in SQL SERVER 2008

查看:73
本文介绍了如何在SQL SERVER 2008中从存储过程创建Zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从SQL SERVER 2008中的存储过程创建Zip文件?

假设我在D中有文件:\测试

我想要压缩该文件夹任何其他位置,如c:\ Test.zip

请让我知道是否可能,如果是,那么如何?

How to Create Zip file from Stored Procedure in SQL SERVER 2008?
Suppose i have file in D:\Test
And i want to Zip that folder in any other location like c:\Test.zip
Please let me know is it possible or not if yes then how?

推荐答案

您可以使用SQL Stored proc创建zip文件。你需要调用shell并调用相应的程序或API来压缩文件。

我不确定你的确切要求是什么,但从SQL Proc调用shell并调用另一个程序不是好的做法。



如果您仍想使用存储过程压缩文件,请通过以下链接:



http: //blog.akumars.esoftera.in/post/2012/05/17/Create-zip-file-in-stored-procedure-in-Sql-server.aspx [ ^ ]



http://blog.akumars.esoftera.in/post/2012/05/17/Create-zip-or-rar-file -in-stored-procedure-in-Sql-server.aspx [ ^ ]
You can create the zip file using SQL Stored proc. You need to invoke the shell and call the corresponding program or API to zip the file.
I am not sure what is your exact requirement, but invoking a shell from SQL Proc and calling another program is not a good practice.

If you still want to zip the file using stored proc go through the below links:

http://blog.akumars.esoftera.in/post/2012/05/17/Create-zip-file-in-stored-procedure-in-Sql-server.aspx[^]

http://blog.akumars.esoftera.in/post/2012/05/17/Create-zip-or-rar-file-in-stored-procedure-in-Sql-server.aspx[^]


这篇关于如何在SQL SERVER 2008中从存储过程创建Zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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