Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 compress file

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-10-16 : 23:20:59
how to compress file using msdb.dbo.sp_send_dbmail

i tried filename.zip but the file size seems to be same as .csv

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-10-17 : 03:05:39
sp_send_dbmail send out an email, it does not compress file

You have to use 3rd party tools like zip, rar or any other similar tools to do it


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-17 : 04:12:49
You can use SSIS to zip a file if you want. It even has a sent mail task to send email with zipped file as attachment

see below to understand how J# library function can be used for zipping unzipping

http://microsoft-ssis.blogspot.in/2011/01/zip-sourcefile-to-archive.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -