• hello,

    Use my above post.

    I too came across the same problem in my decryption process. Because for decryption, the gpg uses the full OS environment. (Looking for public key private key combination). In gpg, the private key is stored outside the application folder.

    When i tried to decrypt the file using xp_cmdshell (xp_cmdshell executes a SSIS package which has a batch executable task for decrypt file) . I could not decrypt in this manner.

    I solved by creating a webservice (.net) and in that i used a web method to decrypt the file. As the webservice executes out side the sql server environment, service gets full OS environment.

    This way i replaced the batch excutable task from SSIS package to Script task. Script task gets the object of webservice and calls the decrypt method.

    my entire decryption process starts from sql server job -> call sql stored procedure -> sp has xp_cmdshell which calls the SSIS package.

    Thanks