April 24, 2007 at 4:29 am
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
April 24, 2007 at 6:18 am
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.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply