Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Using SSIS to automate PGP encryption of text file Expand / Collapse
Author
Message
Posted Friday, May 11, 2007 6:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, September 22, 2014 1:57 PM
Points: 137, Visits: 66
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!


Kindest Regards,

Ryan
Post #365090
Posted Saturday, May 12, 2007 9:28 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 9:19 AM
Points: 1,046, Visits: 2,739

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, SQL Server MVP
Independent Business Intelligence Consultant
www.TimMitchell.net
@Tim_Mitchell

Post #365407
Posted Monday, May 14, 2007 8:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, September 22, 2014 1:57 PM
Points: 137, Visits: 66

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




Kindest Regards,

Ryan
Post #365649
Posted Monday, May 14, 2007 1:22 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 9:19 AM
Points: 1,046, Visits: 2,739

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, SQL Server MVP
Independent Business Intelligence Consultant
www.TimMitchell.net
@Tim_Mitchell

Post #365752
Posted Monday, May 14, 2007 2:23 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, September 22, 2014 1:57 PM
Points: 137, Visits: 66
Thanks for all of your help!  It is working now.


Kindest Regards,

Ryan
Post #365784
Posted Wednesday, June 25, 2008 4:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 15, 2010 8:15 AM
Points: 4, Visits: 63
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.
Post #523777
Posted Wednesday, July 16, 2008 4:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 17, 2010 12:11 AM
Points: 4, Visits: 17
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
Post #535055
Posted Wednesday, July 23, 2008 12:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 15, 2010 8:15 AM
Points: 4, Visits: 63
Can any one please give the information about PGP encryption?

Santhoshi
Post #539555
Posted Tuesday, July 29, 2008 3:16 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 15, 2010 8:15 AM
Points: 4, Visits: 63
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
Post #543073
Posted Thursday, September 11, 2008 4:52 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:18 PM
Points: 71, Visits: 262
Look at this site:

http://codingstuffs.blogspot.com/2007/03/pgp-inside-ssis-package.html
Post #568193
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse