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, as well as the simba.sparkodbc.ini file in the lib subfolder of the connector installation directory. If you store these configuration files elsewhere, 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 the full path and file name of the odbc.ini file.
  • Set ODBCINSTINI to the full path and file name of the odbcinst.ini file.
  • Set SIMBASPARKINI to the full path and file name of the simba.sparkodbc.ini file.

If you are using unixODBC, do the following:

  • Set ODBCINI to the full path and file name of the odbc.ini file.
  • Set ODBCSYSINI to the full path of the directory that contains the odbcinst.ini file.
  • Set SIMBASPARKINI to the full path and file name of the simba.sparkodbc.ini file.

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

For iODBC:

export ODBCINI=/usr/local/odbc/odbc.ini

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

export SIMBASPARKINI=/etc/simba.sparkodbc.ini

For unixODBC:

export ODBCINI=/usr/local/odbc/odbc.ini

export ODBCSYSINI=/usr/local/odbc

export SIMBASPARKINI=/etc/simba.sparkodbc.ini

To locate the simba.sparkodbc.ini file, the connector uses the following search order:

  1. If the SIMBASPARKINI environment variable is defined, then the connector searches for the file specified by the environment variable.
  2. The connector searches the directory that contains the connector library files for a file named simba.sparkodbc.ini.
  3. The connector searches the current working directory of the application for a file named simba.sparkodbc.ini.
  4. The connector searches the home directory for a hidden file named .simba.sparkodbc.ini (prefixed with a period).
  5. The connector searches the /etc directory for a file named simba.sparkodbc.ini.