Configuring the ODBC drivers

Under the default ODBC driver installation directory (/opt/odbc), there is an odbc.ini file with sample DSN entries. Modify this file to assign a DSN name to your ODBC database. In your .profile, assign ODBCINI to point to the odbc.ini file. For example, if you used the default installation directory, you would use:

ODBCINI=/opt/odbc/odbc.ini; export ODBCINI

The UNIX shared library path must include the ODBC shared library directory (/opt/odbc/lib). This is the directory containing the ODBC drivers. The UNIX shared library path variable depends on your UNIX operating system.

Table 6-1:

UNIX Operating System Name

Shared Library Path Name

HP-UX

SHLIB_PATH

IBM AIX

LIBPATH

Sun Solaris

LD_LIBRARY_PATH

For Bourne shell users, append the script /opt/odbc/odbc.sh to your .profile. For “C” shell users, append the script /opt/odbc/odbc.csh to your .profile. These scripts will set additional required environment variables needed by the ODBC drivers.