Setting ODBC Driver Settings on Linux and UNIX-Like Platforms

Driver settings specific to Vertica are stored in a text file named vertica.ini (although you may choose a different file name). On Linux and UNIX platforms, you must edit the vertica.ini file to supply additional configuration settings before the ODBC driver can function properly. You tell the Vertica ODBC driver where to find the vertica.ini file using an environment variable named VERTICAINI.

Required Settings

On Linux and UNIX platforms, you must configure two settings in order for the ODBC driver to work correctly:

  • ErrorMessagesPath
  • ODBCInstLib (unless the driver manager's installation library is in a directory listed in the LD_LIBRARY_PATH or LIB_PATH environment variables).

If your driver manager does not use UTF-8 encoding, you need to set DriverManagerEncoding to the proper encoding.

Create a vertica.ini File

There is no standard location for the vertica.ini file—you can store the file anywhere that it is convenient for you on your client system. One possible location is in the /etc directory if you have multiple users on your client system that need to access it. You can also have a vertica.ini file in each user's home directory so users can alter their own settings. Wherever you store it, be sure users have read access to the file.

The format of the vertica.ini file is similar to the odbc.ini file, with a section followed by parameter definitions. Unlike the odbc.ini file, vertica.ini contains a single section named Driver:


Following the section definition, you add setting definitions, one per line. A setting definition consists of the setting name, followed by an equal sign (=), followed by the value. The value does not need quotes. For example, to set the ODBCInstLib setting, you add a line like this:


See Additional Parameter Settings for a list of the additional settings.

Set the VERTICAINI Environment Variable

You must set an environment variable named VERTICAINI to the absolute path of the vertica.ini file. The Vertica ODBC driver uses this variable to find the settings.

Where you set this variable depends on whether users on your client system need to have separate vertica.ini files. If you want to have a single, system-wide vertica.ini file, you can add a command to set VERTICAINI in /etc/profile or some other system-wide environment file. For example:

export VERTICAINI=/etc/vertica.ini

If users need individual vertica.ini files, set VERTICAINI in their ~/.profile or similar configuration file. For example:

export VERTICAINI=~/.vertica.ini

Example vertica.ini File

The following example vertica.ini file configures the ODBC driver to:

  • use the 64-bit UNIXODBC driver manager.
  • get its error messages from the standard Vertica 64-bit ODBC driver installation directory.
  • log all warnings and more severe messages to log files stored in the temporary directory.