Specifying the Locations of the Connector Configuration Files

By default, ODBC driver managers are configured to use hidden versions of the odbc.ini and odbcinst.ini configuration files (named .odbc.ini and .odbcinst.ini) located in the home directory. If you want to store these configuration files in different locations, then you must set the environment variables described below so that the driver manager can locate the files.

If you are using iODBC, do the following:

  • Set ODBCINI to point to your odbc.ini file.
  • Set ODBCINSTINI to point to your odbcinst.ini file.

If you are using unixODBC, do the following:

  • Set ODBCINI to point to your odbc.ini file.
  • Set ODBCSYSINI to the full path of the directory that contains the odbcinst.ini file.

For example, if your odbc.ini file is located in /etc and your odbcinst.ini file is located in /usr/local/odbc, then set the environment variables as follows:

For iODBC:

export ODBCINI=/etc/odbc.ini

export ODBCINSTINI=/usr/local/odbc/odbcinst.ini

For unixODBC:

export ODBCINI=/etc/odbc.ini

export ODBCSYSINI=/usr/local/odbc