如何将数据库文件压缩为zip

问题描述:


我已经完成了数据库备份和还原数据库,但是我需要成为数据库
zip格式的备份
请帮我摆脱这个



hi ,
i have done a database backup & restore the database, but i need to be database
backup in zip Format
Plz Help me too get out off this



Thanks!!

如果要在备份后压缩备份文件,可以使用System.IO.Compression使用.Net中提供的文件压缩. 这是一个示例 [
If you want to compress backup file after taking backup you can use File Compression provided in .Net using System.IO.Compression.
Here is an example[^].


是此SQL Server.如果是这样,并且您使用的是Enterprise或Standard Edition 2008 R2,则还可以在备份时压缩备份.

据我所知这不是ZIP,但是如果目标是节省磁盘空间,则在备份期间立即进行压缩可能会有所帮助.有关更多信息,请参见:备份(Transact-SQL) [
Is this SQL Server. If it is and you use Enterprise or Standard edition 2008 R2, you can also compress the backup when it''s taken.

As far as I know this isn''t ZIP, but if the goal is to save disk space it could be beneficial to make the compress immediately during the backup. More info see: BACKUP (Transact-SQL)[^]