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

Nick Gorham nick.gorham at easysoft.com
Wed Mar 21 12:12:29 GMT 2007

shiv kumar wrote:

> 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?

You can't change it its built into the libraries you created. However 
you can override it at runtime. set ODBCSYSINI to be the path of the 
directory that contains your system odbc.ini and odbcinst.ini file or 
ODBCINI to be the path and filename of your odbc.ini

Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org

More information about the unixODBC-support mailing list