'[08001][TPT] [ODBC SQL Server Wire Protocol driver] Invalid connection Data
Question: I have a python program that implies connecting to a teradata database. The
server name is defaulted. Two people can succesfully use the python program
but one person can't and gets the following error message:

    
    
    '[08001][TPT]  [ODBC SQL Server Wire Protocol driver] Invalid connection Data
    ., [TPT][ODBC SQL Server Wire Protocol driver ]Invalid attribute in connection string : DBCNAME.'
    

The person who gets the error message has access to that server and uses
Teradata.

Python code:

    
    
    import teradata
    
    udaExec = teradata.UdaExec (appName="test", version="1.0",
                logConsole=False)
    session = udaExec.connect(method="odbc", system=servername,username=user1, password=passw)
    


Answer: If you check the log you can see that probably you have more than one driver
for Teradata set into your ODBC configuration.

To set your correct Teradata driver you can add driver property to connect
method:

    
    
    session = udaExec.connect(method="odbc", system="servername", username=user1, password=passw, driver="Teradata");
    

A different way to connect to Teradata could be using a DSN defined by user in
ODBC settings:

    
    
    import teradata
    
    udaExec = teradata.UdaExec (appName="test", version="1.0", logConsole=False)
    session = udaExec.connect(method="odbc", dsn="<dsn-defined-by-user>", username=user1, password=passw)
    

