how to check odbc version on linux or how to check is there odbc driver install or not - linux

I am trying to install odbc driver on linux but could not check either it's install or not , please tell me how to check odbc driver are install on linux

Both Debian and Redhat/CentOS have a config file that lists all the ODBC drivers you have installed on the system.
/etc/odbcinst.ini
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/libodbcpsqlS.so
Driver64=/usr/lib64/psqlodbcw.so
Setup64=/usr/lib64/libodbcpsqlS.so
FileUsage=1
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/libmyodbc5.so
Setup=/usr/lib/libodbcmyS.so
Driver64=/usr/lib64/libmyodbc5.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1
[MariaDB ODBC Driver]
Description=MariaDB Connector/ODBC v.3.1
Driver=/usr/lib64/libmaodbc.so
UsageCount=1

There are two open source ODBC driver managers for UNIX (unixODBC and iODBC). unixODBC Driver Manager as it is the one included with most Linux distributions and some UNIX distributions.
In unixODBC ODBC drivers are defined in the odbcinst.ini file. If unixODBC is already installed you can use unixODBC's odbcinst program to locate the odbcinst.ini file used to defined drivers:
$ odbcinst -j
unixODBC 2.2.11
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /root/.odbc.ini
Note, the above command also shows the version of unixODBC, in this case version 2.2.11.

Related

odbcinst symbol lookup error SQLManageDataSources

I've just installed unixODBC on Pop-OS (Ubuntu 20 base). there's no odbcinst.ini file, just odbc.ini and when I run odbcinst -j I just get the following
odbcinst: symbol lookup error: odbcinst: undefined symbol: SQLManageDataSources
I'm not an experienced ODBC user. I just have a task to connect to SQL Anywhere DB which is a big enough pain as it is, but from what I can see I need unixODBC up and working and then use freetds as the driver (as other drivers are propriety)
However, unixODBC seems to be busted, or I think it is.
I have unixODBC, unixODBC-dev, pyodbc, freetds, freetds-bin, freetds-dev and SQL Anywhere Developers edition installed
I did a reinstall of unixodbc and freetds and it fixed the problem. SqlManageDataSources appears to be a unixODBC function that obviously installed incorrectly

[unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so' : file not found

I have installed Postgresql 9.4 on Ubuntu 16.04, and installed postgresql ODBC and Unix ODBC drivers. When I test the ODBC connection with isql it works fine. Also, I am able to connect to the databases using pgadmin III from local and remote locations.
But, when I am trying to install a software which will create a connection using ODBC I am getting the following error
Connect failed!
Error code = -1
Status from database system is: STATE=01000, CODE=0, MSG=[unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so' : file not found
ERROR(-1)
But the library actually exists in this location. Please advise. I have attached the odbc.ini and odbcinst.ini for your reference.
file: /etc/odbc.ini
[PostgreSQL_DCTM]
Description=PostgreSQL DCTM
Driver=PostgreSQL_ANSI
Trace=No
TraceFile=/tmp/psqlodbc.log
Database=dctmdev
Servername=localhost
UserName=dctmdbadmin
Password=*******
Port=5432
Protocol=7.4-2
ReadOnly=No
RowVersioning=No
ShowSystemTables=No
ShowOidColumn=No
FakeOidIndex=No
UpdateableCursors=Yes
ConnSettings=
DEBUG=Yes
file: /etc/odbcinst.ini
[PostgreSQL_ANSI]
Description=PostgreSQL ODBC driver (ANSI version)
Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=2
[PostgreSQL_Unicode]
Description=PostgreSQL ODBC driver (Unicode version)
Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=2
Your help is much appreciated!
Update - 08/01/2018
/documentum/product/7.3/install/Server_Configuration_Program.bin: POSIX shell script executable (binary data)
/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=e76dd2bbea2b741a14671866f35468af7c62acbb, stripped
The version of the psqlodbca.so is shown as 'stripped'. However, in the documentation of the software that I am trying to install it mentions to use 'not stripped' version. Could you please help me understand how could I procure the 'not stripped' version of the client library?
The problem was with the packaged libraries in the software that I was using to communicate to the database. After removing liblber-2.4.so.2 from the software lib, this started working.
For your reference, if any of you out there, is facing same problem while installing Opentext Documentum 7.3 on Ubuntu 16.04 and PostgreSQL 9.4, you might be hitting the same issue.

ODBC on Linux VM Instance

I have a python script that I want to place on a Linux VM running Ubuntu 18.04.1 LTS.
The python script requires an ODBC driver to connect to a SQL Server.
I installed the ODBC drivers to the machine following Microsoft's instructions found here.
Whenever I run odbcinst -j I get
unixODBC 2.3.6
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/~/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
However when I try to locate the drivers, they can't seem to be found. All of the data sources/drivers above return "no location" when I try to locate. Furthermore, running ls -a /etc/ shows that obdc.ini and obdcinst.ini are file archives.
Is there any way to locate where the driver libraries are stored so I can link that to my script?

Cannot add the ODBC Oracle Driver

I am trying to add the ODBC driver for Oracle so that i can make an excel query. I have Win7 64bit and Office2010 64bit.
I have already tried to install:
Oracle - Oraclient12Home1
Oracle - OraDB11ghome1
codeproject.com/Questions/239773/how-to-configure-microsoft-odbc-for-oracle-in-win
stackoverflow.com/questions/11873160/connect-to-an-oracle-db-using-odbc
It just won't add.
Both:
The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
Have the below drivers only.
![ODBC Data Source Administrator][1]
http://i.stack.imgur.com/ERYMM.png

ISQL command result in: can't open lib 'odbcci.so' with unixODBC and Pervasive Client on Ubuntu Linux

I can't figure it out how to connect to a Pervasive DB on a Windows Server machine from an Ubuntu Linux 64bit via ODBC.
I installed unixodbc, then 32bit Pervasive Client 11sp2 from here and after moving the tar content to /usr/local/psql and executing the clientpreinstall.sh and the clientpostinstall.sh I did the dsnadd command, adding the dba source.
Now, if I try to test the ODBC connection with isql -v dba i get the following:
[ISQL]ERROR: Could not SQLConnect
[01000][unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib/odbcci.so' : file not found
odbcci.so exists in that dir.
What should I do to make it work?
This is a similar problem to the one in another question:
Pervasive ODBC on Linux Error [01000][unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib/odbcci.so' : file not found
The answer is that you need to either run as the user psql which was created by the Pervasive install script, or source the .bashrc from that user's home prior to attempting an ODBC connection.

Resources