SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Using SSIS to automate PGP encryption of text file


Using SSIS to automate PGP encryption of text file

Author
Message
Ryan-257272
Ryan-257272
SSC Veteran
SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)

Group: General Forum Members
Points: 231 Visits: 67
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
Tim Mitchell
Tim Mitchell
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3727 Visits: 3055

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, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices


Ryan-257272
Ryan-257272
SSC Veteran
SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)

Group: General Forum Members
Points: 231 Visits: 67

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
Tim Mitchell
Tim Mitchell
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3727 Visits: 3055

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, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices


Ryan-257272
Ryan-257272
SSC Veteran
SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)

Group: General Forum Members
Points: 231 Visits: 67
Thanks for all of your help! It is working now.


Kindest Regards,

Ryan
santu
santu
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 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.
nikolaskp
nikolaskp
Valued Member
Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)

Group: General Forum Members
Points: 66 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
santu
santu
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 63
Can any one please give the information about PGP encryption?

Santhoshi
santu
santu
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 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
Eric1972
Eric1972
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 269
Look at this site:

http://codingstuffs.blogspot.com/2007/03/pgp-inside-ssis-package.html
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search