Aditya
Aditya

Reputation: 2301

How to setup ODBC connection via command line for Teradata driver?

I am trying to setup a Teradata ODBC User DSN via below command line code.

%WINDIR%\System32\odbcconf.exe CONFIGDSN "Teradata" "DSN=Test|Description=Test|SERVER=ServerName|Trusted_Connection=Yes|Database=Controltub|UID=<LoginId>"
%WINDIR%\SysWOW64\odbcconf.exe CONFIGDSN "Teradata" "DSN=Test|Description=Test|SERVER=ServerName|Trusted_Connection=Tes|Database=Controltub|UID=<LoginId>"

This code works fine for "SQL Server" driver. However when I try to make changes accordingly for Teradata ODBC creation, it fails without any error. I get blank in text fields for server name/IP field & user id in ODBC window.

Upvotes: 1

Views: 4112

Answers (1)

Rob Paller
Rob Paller

Reputation: 7786

The following worked for me with the Teradata 16.20 Driver on Windows 7:

%WINDIR%\System32\odbcconf.exe CONFIGDSN “Teradata Database ODBC Driver 16.20” “DSN=Test|Description=Test|DBCName={server}|DefaultDatabase=DBC|MechanismName=TD2|Username={user}”

Once you create the DSN, you can go into the Registry under Computer\HKEY_CURRENT_USER\Software\ODBC\ODBC.INI{DSN Name} and try the other property (key) names to customize the DSN creation further. What I provide should get you a basic DSN to connect to Teradata.

Replace TD2 with LDAP if your environment uses LDAP authentication.

Upvotes: 1

Related Questions