Page 1 of 1

Issue with server routines calling teradata database.

Posted: Fri Aug 29, 2008 8:31 am
by mintter
Hi,

I am facing an issue with server routines when I trying to migrate from DB2 to Teradata.
Routines with Db2 calls was written in DS 7.5 versions
We are using DS version 8 and changing the routine which calls Teradata version 12 now.

below is the snapshot of initial routine:------------------------------------------
sSQL = 'connect to ':pUKDWDATABASE:' user ':pUKDWUSERNAME:' using ':pUKDWPASSWORD
cmd = 'db2 -x "':sSQL:'"'
if sMSG = '' then sMSG = cmd
Call DSExecute('UNIX',cmd,sOutput,sError)


Below is the snapshot of routines changed to Teradat:
-------------------------------------------------------------
sSQL = ' bteq .logon ':pTDDATABASE:'/':pTDUSERNAME:', ':pTDPASSWORD
if sMSG = '' then sMSG = cmd
Call DSExecute('UNIX',sSQL,sOutput,sError)

It compiles. But it jus hangs up and does not run.
Please let me know if there are any solutions.

Posted: Fri Aug 29, 2008 9:18 am
by DSguru2B
Welcome Aboard,
What else are you doing besides just connecting to it. I believe that its logging you in and just waiting for your next input which it never gets. You see this as "the routine is hung".
Try to pass it a sql command along with a quit/terminate statement and see what happens.

Posted: Fri Aug 29, 2008 10:01 am
by throbinson
I agree. Can we assume the final tick and a semi-colon are a cut/paste typo?