extract tar.tz file in SSIS

  • Hi,

    I want to extract tar.tz file. for this I tried below command in command line using 7z.exe and it extract files

    7z x -y "c:\test\test.tar.gz" -so | 7z x -y -aoa -si -ttar -o"c:\test\1\"

    however, when I am trying to extract using ssis, it's not working.

    I am getting error code 7, which means there is some problem in arguments.

    In ssis, I am using "Execute process task" and in executable property I am giving path "C:\Program Files (x86)\7-Zip\7z.exe" and in argument I am passing

    x -y "c:\test\test.tar.gz" -so | x -y -aoa -si -ttar -o"c:\test\1\" even tried with

    x -y "c:\test\test.tar.gz" -so | 7z x -y -aoa -si -ttar -o"c:\test\1\"

    but still not working.

    Can any one has done this.

    Please help.

  • If it worked for you from the CMD prompt but it does work from SSIS, I have to ask... is SSIS on the same machine that you had the successful CMD prompt run on? SSIS won't be able to see you local C: drive if it's on a different machine unless you use a UNC instead of a file path AND you have to give SSIS privs to see your machine.

    A better way would be to copy the file to the SSIS machine and try again. 7-ZIP must also be installed on the SSIS box.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thanks for your reply Jeff.

    yes I run it on same box where SSIS is installed. same command was not working from SSIS. I am giving network path for the file.

    Most interesting thing is, I created a batch file and passed 2 parameters. when I called that batch file and passed path and destination path, It works but it has not given warning if failed. In each case it has given me success msg.

    I believe, If some command is working from command line, it should work from SSIS as well.

    I also tried one more thing, when I run the extract using 7 zip, It extract the file in .tar format and in 2nd execute process it extract files from .tar file. but at the end it gives error code 2 (Fatal error) and it show red color at execute process task.

    Not sure what is wrong with my 1st command in which I was trying to extract files in one go from .tar.tz file.

    Any help will be appreciated.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply