[unixODBC-support] How to change the CONFIGURATION path of odbcinst.ini and odbc.ini

shiv kumar shivblore2000 at gmail.com
Wed Mar 21 11:42:56 GMT 2007

Hi All,

I have built the UnixODBC and FreeTDS using the configuration path
/build/unixODBC and /build/FreeTDS. Then I have copied completely
these installation directories ( unixODBC and FreeTDS ) to another
system under the directory "/export/ODBC". I have faced a lot of
problems in connecting the isql with DSN name and finally when I have
executed the following command it is showing the below result:
bash-2.04$ odbcinst -j
unixODBC 2.2.11
DRIVERS............: /build/unixODBC/etc/odbcinst.ini
SYSTEM DATA SOURCES: /build/unixODBC/etc/odbc.ini
USER DATA SOURCES..: /u/ask/.odbc.ini

>From the result I found that the unixODBC is using the hard coded path
(during the build which I supplied) to find the odbcinst.ini. Also I
am able to confirm this using the below grep. I am expecting the
odbc*.ini should be accessed from the "/export/ODBC/unixODBC/etc"
directory. For the user DSN it is taking the .odbc,ini from the HOME
directory. Can any one please let me know how to change this
CONFIGURATION path of odbcinst.ini and odbc.ini without building the
libraries and executables again?

bash-2.04$ pwd
bash-2.04$ grep build ./*/* | more
./bin/drv_template:Driver          = /export/ODBC/freetds/lib/libtdsodbc.so
/build/unixODBC/lib/libodbc.la -ldl -liconv -lpthread'
./lib/libodbc.a:                        Connection Out [%s]
./lib/libodbc.so:                       Connection Out [%s]
./lib/libodbc.so.1:                     Connection Out [%s]


More information about the unixODBC-support mailing list