DTS Export and interface with PGP Encryption

  • 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

  • This was removed by the editor as SPAM

  • 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

  • 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