Testing connection to DSN

  • We have a DTS that connects to a teradata server using a System DSN.

    The issue is that the password for the ID used in the connection expires after every 2 months.

    Whenever this happens, the DTS doesnt complete and hangs up.

    We want to put in a check at the start of DTS to check if the connection succeds and if it fails, the DTS needs to fail.

    We need pointer as to how we can achive this

  • You could use an ActiveX script to try to connect to the DSN. You can then have OnSuccess and OnFailure workflows from it.

    Something like:

    Function Main()

     Dim conn

     Dim connStr

     Dim userID, pWord

     userID = DTSGlobalVariables("gv_User").Value

     pWord = DTSGlobalVariables("gv_Pass").Value

     Set conn = CreateObject("ADODB.Connection")

     connStr = "DSN=trialDsnConnect;Uid=" & userID & ";Pwd=" & pWord & ";"

     conn.open (connStr)

     Main = DTSTaskExecResult_Success

    End Function

    This script can be modified with Error Trapping to customise error messages. Or, as said above, you can use Success and Failure workflows.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply