Filip Eriksson
Filip Eriksson

Reputation: 977

'[08001][TPT] [ODBC SQL Server Wire Protocol driver] Invalid connection Data

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)

Upvotes: 4

Views: 3360

Answers (1)

Francesco Diaferio
Francesco Diaferio

Reputation: 69

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)

Upvotes: 4

Related Questions