<docbook><section><title>IODBCConfigFilesUnix</title><bridgehead class="http://www.w3.org/1999/xhtml:h2">iODBC SDK Development</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">iODBC SDK on Unix</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">The Configuration Files</bridgehead>
<para>The iODBC library searches for Data Source Names (DSNs) using the following resources:</para><itemizedlist mark="bullet" spacing="compact"><listitem> $ODBCINI - the environment variable, if set </listitem>
<listitem> ~/.odbc.ini - in your home-directory, if it exists </listitem>
<listitem> /etc/odbc.ini - a system-wide default</listitem>
</itemizedlist><para>The format of the odbc.ini file is very simple.
 There are 3 sections; one for ODBC itself, one for a list of DSNs, and one for the definitions of those DSNs.
 For example:</para><programlisting>[ODBC]
Debug         = 1
Trace         = 0
DebugFile     = /home/tim/temp/odbc-debugfile.log
TraceFile     = /home/tim/temp/odbc-tracefile.log
TraceAutoStop = 1

[ODBC Data Sources]
Virtuoso30 = OpenLink Virtuoso 3.0

[Virtuoso30]
Description = Virtuoso 3.0
Driver      = /opt/opl/virtuoso-o12/lib/virtodbc.so
Address     = localhost:1111
UserName    = dba
User        = dba
</programlisting><para> Each DSN has an entry in the `ODBC Data Sources&#39; section and a complete definition in a paragraph section of its own.</para><para>There is also an ODBCINSTINI file.
 This file provides the full path to any installed drivers and any setup files associated with them.</para><programlisting>[ODBC Drivers]
OpenLink Generic = installed

[OpenLink Generic]
Driver = /opt/openlink/odbcsdk/lib/oplodbc.so
</programlisting></section></docbook>