• Hello Tim,,

    Is that error any thing related to the permission of sql server ? I created an Sql job which executed the batch file. The batch file has the code to decrypt the gpg file . Below is the code

    echo test| gpg --passphrase-fd 0 --decrypt files "F:\folder\FTP\DL-8153015-20110518.txt.pgp"

    "test" is the passphase.

    When i execute this batch file from sql server agent , i am getting this error log :

    C:\Windows\system32> echo test| gpg --passphrase-fd 0 --decrypt files "F:\folder\FTP\DL-8153015-20110518.txt.pgp"

    gpg: encrypted with ELG-E key, ID 2AADDF95

    gpg: decryption failed: secret key not available

    Why it saying secret key not available. the "test" is the secret key and this same command run perfectly in command prompt. Why not in sqlserver agent or from sql sp's...

    I think its some thing to do with permission level in sql server. Because the decrypt uses the private key and need full system environment... What's your solution.. Can you advice.. I am stuck up with this issue for 2 days....My system is 64bit , os is vista. GnuPG - The GNU Privacy Guard Version 1.4.11