PGP Problems in SSIS

  • Hi Experts,

    I have a process in SSIS that have a function to encrypt a zipfile. I'm using PGP command line inside a .bat file.

    Using DTEXEC (Cmd), SSMS (Job) and SSIS (Debug Mode) I have the same error below:

    DTEXEC.EXE /F "E:\MyApplication\App\bin\MyApplication.dtsx"

    [Execute Process Task] Error: In Executing "C:\MyApplication\Applications\PGP.bat" "" at "E:\MyApplication", The process exit code was "2" while the expected was "0".

    I already verify all paths in my environment, the executable is in the path, I'm tre administrator of the machine but the thing isn't working.

    Follow above the code of PGP:

    gpg --recipient "MyApp" --output "Encrypted.ZIP.PGP" --encrypt "Encrypted.ZIP"

    Thanks in advance.

  • What happens if you change the SuccesValue property of the Execute Process Task to 2 instead of 0?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • +1 to the suggestion on SuccessValue above, assuming the gpg is working properly.

    Have you tried a more comprehensive command line, perhaps:

    gpg2 --batch --encrypt --sign --local-user "Your key" --passphrase "Your passphrase" --recipient "Their key" --trust-model always --output "Encrypted.zip.pgp" "Encrypted.zip"

    Or, if you really don't want to sign it,

    gpg2 --batch --encrypt --recipient "Their key" --trust-model always --output "Encrypted.zip.pgp" "Encrypted.zip"

    Substitute gpg for gpg2 if you're on a version that doesn't have gpg2 as a command.

  • Thanks all for replies.

    I don't know how, but the whole thing worked using after change some files.

    Thanks everyone.

Viewing 4 posts - 1 through 4 (of 4 total)

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