Open ackshooairy opened 5 years ago
I discovered that I can connect if I specify the username and password in the udaExec.Connect arguments. I'm assuming that somehow they are not able to be gathered from my ODBC DSN. Perhaps there is something I'm missing to have them pass through?
I am using teradata version 15.10.0.21 through the Anaconda distribution and am unable to connect with the following commands:
import teradata
udaExec = teradata.UdaExec (appName="TD", version="1.0", logConsole=False)
session = udaExec.connect (method="odbc", Authentication="LDAP", dsn="EDW_PROD");
I receive the following errors:
Traceback (most recent call last):
File "", line 1, in
session = udaExec.connect (method="odbc", Authentication="LDAP", dsn="EDW_PROD");
File "C:\Users\u356026\AppData\Local\Continuum\anaconda3\lib\site-packages\teradata\udaexec.py", line 183, in connect **args))
File "C:\Users\u356026\AppData\Local\Continuum\anaconda3\lib\site-packages\teradata\tdodbc.py", line 454, in init checkStatus(rc, hDbc=self.hDbc, method="SQLDriverConnectW")
File "C:\Users\u356026\AppData\Local\Continuum\anaconda3\lib\site-packages\teradata\tdodbc.py", line 231, in checkStatus raise DatabaseError(i[2], u"[{}] {}".format(i[0], msg), i[0])
DatabaseError: [28000] [Teradata][ODBC Teradata Driver][Teradata Database] The UserId, Password or Account is invalid.
I am able to establish a connection if I remove
Authentication="LDAP"
and login using my database password.Also, using Python 3.6.0 with Teradata package version 15.10.0.20 I am able to successfully connect with the same commands. I tried to dig into the source and was able to determine that the todbc.py files are indeed different, but I'm in over my head and can't figure out what's going on.
Edit 10/8: It crossed my mind to downgrade the Teradata package in Anaconda to 15.10.0.20. I tried, this but the same error still occurs. This may be an issue with anaconda compatibility rather than the newer version.