ODBC - odbcinst.ini


odbcinst.ini has all driver information configuration. See ODBC - unixODBC

Configuration file containing all the database drivers specifications. odbcinst.ini




odbc_config --odbcinstini
# or it can also be seen in:
odbcinst -j

Normally: /etc/odbcinst.ini


In the odbcinst ini file, each ODBC driver has its own section and can be referred to by the name of its section.

Recognized configuration, keys are:

  • Description: A text string briefly describing the driver.
  • Driver A filesystem path to the actual driver library.
  • Setup A filesystem path to the driver setup library.
  • FileUsage: odbcinst entry, if you edit the configuration file by hand, you have to supply it yourself. ???

The shared library driver extension is operating system dependent:

  • .so for Linux, Solaris, or AIX,
  • .sl for HP-UX.

Example: How to add a driver system wide

  • First create a template template.ini:
Description = PostgreSQL driver for GNU/Linux
Driver      = /usr/lib/psqlodbcw.so
Setup       = /usr/lib/libodbcpsqlS.so
  • Apply the template
$ odbcinst -i -d -f template.ini
  • Then reference it in the odbc.ini as follows:
Driver = PostgreSQL

Powered by ComboStrap