Environment Variables

The first step in setting up and configuring the drivers for use is to set several environment variables. The following procedures require that you have the appropriate permissions to modify your environment and to read, write, and execute various files. You must log in as a user with full r/w/x permissions recursively on the entire DataDirect Connect64 and Connect64 XE for ODBC installation directory.

Library Search Path

The library search path variable can be set by executing the appropriate shell script located in the ODBC home directory. Determine which shell you are running by executing:

echo $SHELL 

C shell (and related shell) users must execute the following command before attempting to use ODBC-enabled applications:

source ./odbc.csh 

Bourne shell (and related shell) users must initialize their environment as follows:

. ./odbc.sh 

Executing these scripts sets the appropriate library search path environment variable (LD_LIBRARY_PATH on Solaris, Linux, and HP-UX, or LIBPATH on AIX). The library search path environment variable must be set so that the ODBC core components and drivers can be located at the time of execution. After running the setup script, execute:

env 

to verify that the installation_directory/lib directory has been added to your shared library path.

The DataDirect Connect64 for ODBC Oracle driver must have environment variables set as required by the Oracle database client components.

ODBCINI

Setup installs in the product installation directory a default system information file, named odbc.ini, that contains data sources. See "Data Source Configuration" for an explanation of the odbc.ini file. The system administrator can choose to rename the file and/or move it to another location. In either case, the environment variable ODBCINI must be set to point to the fully qualified path name of the system information file.

For example, to point to the location of the file for an installation on /opt/odbc in the C shell, you would set this variable as follows:

setenv ODBCINI /opt/odbc/odbc.ini 

In the Bourne or Korn shell, you would set it as:

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

As an alternative, you can choose to make the system information file a hidden file and not set the ODBCINI variable. In this case, you would need to rename the file to .odbc.ini (to make it a hidden file) and move it to the user's $HOME directory.

The driver searches for the location of the system information file as follows:

  1. The driver checks the ODBCINI variable
  2. The driver checks $HOME for .odbc.ini

If the driver does not locate the system information file, it returns an error.

ODBCINST

Setup installs in the product installation directory a default file, named odbcinst.ini, for use with DSN-less connections. See "DSN-less Connections" for an explanation of the odbcinst.ini file. The system administrator can choose to rename the file or move it to another location. In either case, the environment variable ODBCINST must be set to point to the fully qualified path name of the odbcinst.ini file.

For example, to point to the location of the file for an installation on /opt/odbc in the C shell, you would set this variable as follows:

setenv ODBCINST /opt/odbc/odbcinst.ini 

In the Bourne or Korn shell, you would set it as:

ODBCINST=/opt/odbc/odbcinst.ini;export ODBCINST 

As an alternative, you can choose to make the odbcinst.ini file a hidden file and not set the ODBCINST variable. In this case, you would need to rename the file to .odbcinst.ini (to make it a hidden file) and move it to the user's $HOME directory.

The driver searches for the location of the odbcinst.ini file as follows:

  1. The driver checks the ODBCINST variable
  2. The driver checks $HOME for .odbcinst.ini

If the driver does not locate the odbcinst.ini file, it returns an error.

DD_INSTALLDIR

This variable provides the driver with the location of the product installation directory so that it can access support files. DD_INSTALLDIR must be set to point to the fully qualified path name of the installation directory.

For example, to point to the location of the directory for an installation on /opt/odbc in the C shell, you would set this variable as follows:

setenv DD_INSTALLDIR /opt/odbc 

In the Bourne or Korn shell, you would set it as:

DD_INSTALLDIR=/opt/odbc;export DD_INSTALLDIR 

The driver searches for the location of the installation directory as follows:

  1. The driver checks the DD_INSTALLDIR variable
  2. The driver checks the odbc.ini or the odbcinst.ini files for the InstallDir keyword (see "Configuration Through the System Information File" for a description of the InstallDir keyword)

If the driver does not locate the installation directory, it returns an error.

The next step is to test load the driver.