May 11, 2007 at 6:58 am
I am trying to automate in SSIS the PGP encryption of a text file. Has anyone done this before? Any help would greatly be appreciated. Thanks!
Ryan
May 12, 2007 at 9:28 pm
Ryan -
Use the Execute Process task to run pgp.exe (or whatever the PGP executable is called on your system). You may have to tinker with the parameters you pass to pgp.exe to get the expected result.
hth
Tim
Tim Mitchell
TimMitchell.net | @tmitch.net | Tyleris.com
ETL Best Practices
May 14, 2007 at 8:53 am
Thanks for the help. I am able to launce the PGP command line program using the Execute Process Task, however I am not able to pass any arguments to the program. Here is the code that I am attempting to pass to the PGP command line (using the the Execute Process task):
filecryptsb --encrypt test.txt --user test
This is the only input that I have to submit manually to encrypt the file. However, when I place this code in the argument box it is ignored by SSIS Execute Process task. It simply opens the DOS window and command line.
One other question regarding the text file name...it will be variable in the future. Can you please tell me how to indicate it is variable in the argument statement.
Thanks again for all of your help.
Ryan
Ryan
May 14, 2007 at 1:22 pm
Is filecryptsb the name of the executable? If so, you need to add this in the Executable field and the remainder of your command [--encrypt test.txt --user test] in the Arguments field.
Also, make sure that you don't have any file path issues. Check to make sure that the executable is in your PATH environmental variable, or set the WorkingDirectory value to tell the task where to find this file. Same thing with the source file - you may need to use absolute path to ensure success.
To modify your task to use a variable, you need to create the variable in the designer, and then you can reference the variable in the Expressions tab. For example, I am using the Expressions page to modify the Argument value with the following:
"d:\\web\\cgi-bin\\awstats.pl -config=wnj -logfile=" + @[User::LocalFile]
hth
Tim
Tim Mitchell
TimMitchell.net | @tmitch.net | Tyleris.com
ETL Best Practices
May 14, 2007 at 2:23 pm
Thanks for all of your help! It is working now.
Ryan
June 25, 2008 at 4:44 pm
I am so glad to see this quesion in the website. I have to pgp encrypt the file by using security key? Can you please give the step by step solution for this. I am not familiar with SSIS that's why I am unable to use all the options directly. For example I have test.txt file, here I have to encrypt the file by using pgp encryption(test.txt.pgp). Please give the solution briefly.
Thanks in advance.
July 16, 2008 at 4:11 am
Hi. I have progressed in automating pgp with SSIS. I am using the --password option and a package encryption to try not to put the password in plain sight.
It works when I am in a debug environment, but when I put it in the agent as a job, the pgp task fails (I receive a classic error code 2 and the file is not decrypted).
(the package is executed and decrypted, though).
Any ideas?
Thanks in advance
July 23, 2008 at 12:13 pm
Can any one please give the information about PGP encryption?
Santhoshi
July 29, 2008 at 3:16 pm
Hi,
Can you please help me to encrypt the file by PGP command line?
I tried to ecnrypt some smaple file test.txt by using PGP command line
pgp --encrypt test.txt --recipient santu in the command prompt but it is showing error as . Can you please tell me the problem?
Thanks,
Santhoshi
September 11, 2008 at 4:52 pm
Look at this site:
http://codingstuffs.blogspot.com/2007/03/pgp-inside-ssis-package.html
October 23, 2008 at 12:41 pm
All any of you guys know what Im missing in the argument in Execute SQL Task.
Im trying to encrypt a zip file
Arguments : XXX -encrypt C:\A_20081023.zip
(XXX refers to the User id for the public key given )
October 23, 2008 at 10:36 pm
--recipient "YOUR-NAME" --output "C:\A_20081023.zip.gpg"
--encrypt "C:\A_20081023.zip"
If using GPG remember to look at the syntax here:
October 24, 2008 at 6:22 am
Thank You Eric,
I shall try this right away.
Do I need to pass the passphrase anywhere in Execute SQL Task ?
October 24, 2008 at 1:58 pm
I tried to add the below in arguments for my Execute Script Task.
It gets executed with no errors but It did not create a.gpg
Here is what I am passing,this line works well in command prompt !
Arguments
--recipient "XXX" --output "C:\Testing.zip.gpg" --encrypt " C:\Testing.zip"
XXX -name of public key
Any idea why this does not work?
Viewing 15 posts - 1 through 15 (of 39 total)
You must be logged in to reply to this topic. Login to reply