'How to find list of ODBC drivers installed on Linux

Good day all.

On Windows, the list of installed ODBC drivers located here: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers

On macOS, the list of installed ODBC drivers located here: /Library/ODBC/odbcinst.ini and /Users/{userName}/ODBC/odbcinst.ini

The questions is: where could I find list of ODBC drivers installed in Linux?



Solution 1:[1]

below command works for me in Unix. It shows all the odbcinst.ini files

odbcinst -j 

Solution 2:[2]

cat /proc/modules | grep odbc

or

lsmod | grep odbc

Solution 3:[3]

The nicest tool to deal with all configuration-type stuff of UnixODBC is odbcinst.

From man page of odbcinst.

odbcinst - An unixODBC tool for manipulating configuration files

It's a cool library that will ease your life a little while working in UnixODBC. One of its options:

   -j     Prints current configuration of unixODBC, listing (among others) the paths to the configuration files.

This is what you need.

E.g:

 # odbcinst -j

unixODBC 2.3.6
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

Install it:

apt-get install odbcinst

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rohit Nimmala
Solution 2 rmutalik
Solution 3 Mateen