June 16, 2006 at 1:07 pm
Hi,
I need to setup a DTS job to export the data into a text file and then interface with PGP to perform the data encryption. Does anyone know what tools I need to use and how DTS can interface with the PGP encryption?
Thanks,
LC
June 19, 2006 at 8:00 am
This was removed by the editor as SPAM
June 19, 2006 at 10:29 am
You'll need the PGP command line interface installed on the SQL server the DTS package will be running on. Use the following code in an Active X script task after the file has been created.
You'll also need to know the PGP key id value. You can find this by opening a command window on the server with PGP installed and typing "pgp -l". This will list all of the keys installed.
Option Explicit
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim objFSO
Dim objShell
Dim strFile
Dim strPGPKeyID
Set objFSO= CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
strFile = <path of file you want to encrypt>
strPGPKeyID = <the PGP key id>
If objFSO.FileExists(strFile) Then
objShell.Run("pgp -e " & strFile & " -r " & strPGPKeyID & " --text")
End If
Set objShell = Nothing
Set objFSO = Nothing
Main = DTSTaskExecResult_Success
End Function
June 20, 2006 at 9:01 am
Erik, thanks for the information. Your code got me started and I was able to get it done.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply