Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    12

    Unanswered: How to unzip a file whith Transact sql

    Do U know how to unzip a file with T/SQL?
    thanks in advance,

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: How to unzip a file whith Transact sql

    maybe use the xp_cmdshell
    with your nuzip program and good parameters

    EXEC master..xp_cmdshell 'winzip.exe .........'

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I believe winzip is a gui...which not be good...can it be called in commandline mode?

    Any execution of a gui using xp_cmdshell may hang the box....

    EDIT: Here check this out:

    http://www.winzip.com/wzcline.htm
    Last edited by Brett Kaiser; 02-19-04 at 13:01.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    I use the WinZip command line utility (referenced above by Brett) all the time and it is quite effective. Never called it through T-SQL, but often through VBScript (in a shell).

    Please note that if you use the Command Line interface, then you MUST have a licensed copy of WinZip (otherwise you'll run into the license prompt screen which will stop your interface from running dead in its tracks).

    Regards,

    hmscott

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by hmscott
    I use the WinZip command line utility (referenced above by Brett) all the time and it is quite effective. Never called it through T-SQL, but often through VBScript (in a shell).

    Please note that if you use the Command Line interface, then you MUST have a licensed copy of WinZip (otherwise you'll run into the license prompt screen which will stop your interface from running dead in its tracks).

    Regards,

    hmscott
    Any GUI that pops, and you'll be hosed in sql server....

    Time to Bounce the box....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Feb 2004
    Posts
    12
    Originally posted by Brett Kaiser
    I believe winzip is a gui...which not be good...can it be called in commandline mode?

    Any execution of a gui using xp_cmdshell may hang the box....

    EDIT: Here check this out:

    http://www.winzip.com/wzcline.htm
    I have downloaded the winzip command line, but I don't know how to use it with my transact sql?

    thank you in advance

  7. #7
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Check Brett's referenced link for the commandline options, but use this if the piece of work is one-off option and if its a regular process then consider using OS and not to toggle SQLServer.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •