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.
Author |
Topic |
scabral7
Yak Posting Veteran
57 Posts |
Posted - 2010-12-19 : 14:40:49
|
Hi,Without installing a 3rd party tool such as Winzip or 7zip, is there a way to have SSIS automatically zip files? I thought there might be a way using .net code (either VB or C#), but i can't find anything out there.Any help would be appreciated.Thanks,Scott |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-12-19 : 14:57:17
|
http://www.pragmaticworks.com/Products/Business-Intelligence/TaskFactory/Default.aspxIt's an add-on to SSIS, and let you use zip inside your ssis-package. N 56°04'39.26"E 12°55'05.63" |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2010-12-19 : 20:28:15
|
http://dotnetzip.codeplex.com/releases/view/27890 is pretty easy to add as a library for access via C# or VB also. I have used that before as well as the add-on above. Poor planning on your part does not constitute an emergency on my part. |
|
|
lcsagumjr
Starting Member
1 Post |
Posted - 2010-12-21 : 03:23:40
|
Found this info while trying to create a package to unzip GZIP files.Drag a script task editor in your package and paste this code.http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx |
|
|
SSISJoost
Starting Member
9 Posts |
Posted - 2011-01-08 : 05:49:46
|
quote: Originally posted by scabral7 Hi,Without installing a 3rd party tool such as Winzip or 7zip, is there a way to have SSIS automatically zip files? I thought there might be a way using .net code (either VB or C#), but i can't find anything out there.Any help would be appreciated.Thanks,Scott
The only method is to use the .net comression class: http://msdn.microsoft.com/en-en/library/system.io.compression.aspx, but that only works with gzip. Zip is not supported. You can install Microsoft Visual J# Redistributable Packages ([url]http://msdn.microsoft.com/en-us/vjsharp/Bb188598.aspx[/url], is Microsoft, so not really third party) and use that dll to zip your files with a Script Task. Here is a C# example: http://microsoft-ssis.blogspot.com/2011/01/zip-sourcefile-to-archive.html |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-08 : 13:14:13
|
quote: Originally posted by SSISJoost
quote: Originally posted by scabral7 Hi,Without installing a 3rd party tool such as Winzip or 7zip, is there a way to have SSIS automatically zip files? I thought there might be a way using .net code (either VB or C#), but i can't find anything out there.Any help would be appreciated.Thanks,Scott
The only method is to use the .net comression class: http://msdn.microsoft.com/en-en/library/system.io.compression.aspx, but that only works with gzip. Zip is not supported. You can install Microsoft Visual J# Redistributable Packages ([url]http://msdn.microsoft.com/en-us/vjsharp/Bb188598.aspx[/url], is Microsoft, so not really third party) and use that dll to zip your files with a Script Task. Here is a C# example: http://microsoft-ssis.blogspot.com/2011/01/zip-sourcefile-to-archive.html
we've also successfully implemented this using Microsoft Visual J# Redistributable Packages in one of our project------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|
|
|