'What is the correct value of ODBCDM_Home for unixodbc on ubuntu

I installed unixodbc and unixodbc-dev through apt-get. I then installed oracle instantclient (both the basic and the odbc drivers). Now I am trying to run odbc_update_ini.sh but none of the paths I have tried for the ODBCDM_Home argument seem to be correct. On OSX where I installed unixodbc with brew I was able to use /usr/local/Cellar/unixodbc/2.3.4/ to make things work correctly. But I cannot figure out the ubuntu/apt-get equivalent.



Solution 1:[1]

I always change odbc.ini and odbcinst.ini manually. If you really want to use this odbc_update_ini.sh utility I would suggest to analyze its source code in order to check the path of the files it uses.

I won't be surprised if you need to set ODBCDM_Home to the root (/) directory.

Solution 2:[2]

In my case (Xubuntu 20.04 and instant client from package instantclient-odbc-linux.x64-19.14.0.0.0dbru.zip) has ODBCDM_HOME value /:

sudo ./odbc_update_ini.sh /

There is a check in the script odbc_update_ini.sh. The script checks if a Driver Manager is installed by searching two files: $ODBCDM_HOME/etc/odbc.ini and $ODBCDM_HOME/etc/odbcinst.ini. Both of these files I found in: /etc/odbc.ini and /etc/odbcinst.ini so ODBCDM_HOME must be /.

So the value is not related to apt get, it is a matter of the script odbc_update_ini.sh which is part of the package of the Oracle ODBS client.

BTW: Reading that script was very useful, because it did not work for me from some reason. The script created file /opt/oracle/instantclient_19_14/odbc.ini but it was not able to move the file to $HOME/odbc.ini so I had to move the file manually.

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 mauro
Solution 2 Signy