ODBC - odbcinst.ini

1 - About

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

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

3 - File

3.1 - Location

Run:


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

Normally: /etc/odbcinst.ini

3.2 - Syntax

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.

4 - Example: How to add a driver system wide

  • First create a template template.ini:

[PostgreSQL]
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


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap