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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 zip file using ssis

Author  Topic 

raghav99k
Starting Member

32 Posts

Posted - 2011-12-01 : 10:04:29
can some one help in zip files using ssis....

i tried to zip a file using execute process task
using the command

wzzip "C:\path.zip" "c:\path.txt"


but it is not automated during
process...it is asking for manualintervention to give the zipfile name..

thanks..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-01 : 10:15:21
see

http://www.ssisguru.com/2009/10/unzip-and-zip-files-using-ssis.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

raghav99k
Starting Member

32 Posts

Posted - 2011-12-02 : 03:49:49
Hi visakh i have seen this examplee..

But it throwing some error like..(when using winzip)

Mutiple files were dropped..and one or more in archive...

Can u explaian with an example how to configure it...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-02 : 03:58:31
quote:
Originally posted by raghav99k

Hi visakh i have seen this examplee..

But it throwing some error like..(when using winzip)

Mutiple files were dropped..and one or more in archive...

Can u explaian with an example how to configure it...


i've never used winzip inside ssis for zipping. I've used only j# classes for doing zipping/unzipping

I think the reason for popup is because of winzip ui. what you can try is to install and use command line version of winzip wzzip.exe / wzunzip.exe instead.
Alternatively you can use uitlity shown in link or j# classes as i did inside a script task.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

raghav99k
Starting Member

32 Posts

Posted - 2011-12-02 : 05:21:43
Hi Visakh,


Can u pls send me the J# script which u have used to zip the files..

Go to Top of Page

raghav99k
Starting Member

32 Posts

Posted - 2011-12-02 : 05:23:55
Can u pls post the J# script to zip the files
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-02 : 05:42:24
see this example using same class

http://sqlblog.com/blogs/jorg_klein/archive/2009/08/27/ssis-unpack-a-zip-file-with-the-script-task.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

raghav99k
Starting Member

32 Posts

Posted - 2011-12-02 : 05:45:46
But this is unzip right.. need to zip here any other example.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-02 : 05:57:37
quote:
Originally posted by raghav99k

But this is unzip right.. need to zip here any other example.


In that case also its not much different
It will very much similar with only difference being to call zip funcion instead of unzip. the intellisense will clearly suggest what all arguments it expects.

also you can see here for getting more idea on j# functions

http://msdn.microsoft.com/en-us/magazine/cc164129.aspx
http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream(v=vs.85).aspx#Y1144

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-12-02 : 06:10:45
I usually use pkzip or gzip which have simple command line interfaces.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

raghav99k
Starting Member

32 Posts

Posted - 2011-12-02 : 06:22:50
But we dont have vjslib referencess..

So need to go with Winzip.. But using winzip it is is throwing error.

we are giving executables and arguments correct in Execute Process Task.


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-02 : 07:02:13
quote:
Originally posted by raghav99k

But we dont have vjslib referencess..

So need to go with Winzip.. But using winzip it is is throwing error.

we are giving executables and arguments correct in Execute Process Task.





its redistributable and you can download it

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -