I need to connect to the Teradata database using python. I have used the below code:
import pyodbc
import teradata
cnxn = pyodbc.connect('DRIVER={Teradata};SERVER=<*ServerName*>;DATABASE=<*Database Name*>;UID=<*User ID*>;PWD=<*Password*>',ansi=True, autocommit=True)
cur = cnxn.cursor()
But on executing, I am getting the error as :
Error: ('28000', '[28000] [Teradata][ODBC Teradata Driver] Not enough information to log on (0) (SQLDriverConnect); [28000] [Teradata][ODBC Teradata Driver] Not enough information to log on (0)')
What I am missing here ? What else needs to be included to set up the connection ?
Also, is there any other way to set up the connection. While looking, I have come across teradata.UdaExec(). Can this also be used?
DBCName=
instead ofSERVER=
. Have you tried that? – Gord Thompson