Creating a Data Source Name

When connecting to your data store using a DSN, you only need to configure the odbc.ini file. Set the properties in the odbc.ini file to create a DSN that specifies the connection information for your data store. For information about configuring a DSN-less connection instead, see Configuring a DSN-less Connection.

If your machine is already configured to use an existing odbc.ini file, then update that file by adding the settings described below. Otherwise, copy the odbc.ini file from the Setup subfolder in the connector installation directory to the home directory, and then update the file as described below.

To create a Data Source Name:

  1. In a text editor, open the odbc.ini configuration file.
  2. Note:

    If you are using a hidden copy of the odbc.ini file, you can remove the period (.) from the start of the file name to make the file visible while you are editing it.

  3. In the [ODBC Data Sources] section, add a new entry by typing a name for the DSN, an equal sign (=), and then the name of the connector.
  4. For example, on a macOS machine:

    [ODBC Data Sources]

    Sample DSN=Teradata ODBC Driver

    For example, for a 32-bit connector on an Unix machine:

    [ODBC Data Sources]

    Sample DSN=Teradata ODBC Driver 32-bit

  5. Create a section that has the same name as your DSN, and then specify configuration options as key-value pairs in the section:
    1. Set the Driver property to the full path of the connector library file that matches the bitness of the application.
    2. For example, on a macOS machine:

      Driver=/Library/simba/teradata/lib/tdataodbc_sbu.dylib

      For example, for a 32-bit connector on an Unix machine:

      Driver=/opt/simba/teradata/lib/32/tdataodbc_sb32.so

    3. Set the DBCName property to the IP address or host name of the Teradata Database instance.
    4. For example:

      DBCName=192.168.222.160

    5. Configure authentication for your connection by specifying the authentication mechanism and your credentials as needed. For more information, see Configuring Authentication.
    6. Note:

      If the TeraGSS program specifies the appropriate authentication settings for your connection, then you do not need to configure authentication settings in the connector. By default, the connector uses the authentication mechanism that the TeraGSS program specifies in the tdgssconfigure.xml file.

      Typically, the TeraGSS program specifies TD2 as the authentication mechanism to use.

    7. Optionally, set additional key-value pairs as needed to specify other connection settings. For detailed information about each connection property, see Driver Configuration Options on page 1.
  6. Save the odbc.ini configuration file.

For example, the following is an odbc.ini configuration file for macOS containing a DSN that connects to Teradata:

[ODBC Data Sources]

Sample DSN=Teradata ODBC Driver

[Sample DSN]

Driver=/Library/simba/teradata/lib/tdataodbc_sbu.dylib

DBCName=192.168.222.160

MechanismName=KRB5

For example, the following is an odbc.ini configuration file for a 32-bit connector on an Unix machine, containing a DSN that connects to Teradata:

[ODBC Data Sources]

Sample DSN=Teradata ODBC Driver 32-bit

[Sample DSN]

Driver=/opt/simba/teradata/lib/32/tdataodbc_sb32.so

DBCName=192.168.222.160

MechanismName=KRB5

You can now use the DSN in an application to connect to the data store.