<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY unixodbc-download-http "http://www.unixodbc.org/unixODBC-&unixodbc-version;.tar.gz">
  <!ENTITY unixodbc-download-ftp  "&gentoo-ftp-repo;/unixODBC-&unixodbc-version;.tar.gz">
  <!ENTITY unixodbc-md5sum        "5e4528851eda5d3d4aed249b669bd05b">
  <!ENTITY unixodbc-size          "1.8 MB">
  <!ENTITY unixodbc-buildsize     "33 MB">
  <!ENTITY unixodbc-time          "0.4 SBU">
]>

<sect1 id="unixodbc" xreflabel="unixODBC-&unixodbc-version;">
  <?dbhtml filename="unixodbc.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-20 22:16:55 -0500 (Fri, 20 Feb 2015) $</date>
  </sect1info>

  <title>unixODBC-&unixodbc-version;</title>

  <indexterm zone="unixodbc">
    <primary sortas="a-unixODBC">unixODBC</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to unixODBC</title>

    <para>
      The <application>unixODBC</application> package is an Open Source
      ODBC (Open DataBase Connectivity) sub-system and an ODBC SDK for Linux, Mac
      OSX, and UNIX. ODBC is an open specification for providing application
      developers with a predictable API with which to access data sources. Data
      sources include optional SQL Servers and any data source with an ODBC Driver.
      <application>unixODBC</application> contains the following components used
      to assist with the manipulation of ODBC data sources: a driver manager, an
      installer library and command line tool, command line tools to help install
      a driver and work with SQL, drivers and driver setup libraries.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&unixodbc-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&unixodbc-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &unixodbc-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &unixodbc-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &unixodbc-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &unixodbc-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">unixODBC Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink> and
      <xref linkend="pth"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/unixodbc"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of unixODBC</title>

    <para>
      Install <application>unixODBC</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr \
            --sysconfdir=/etc/unixODBC &amp;&amp;
make</userinput></screen>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install &amp;&amp;

find doc -name "Makefile*" -delete              &amp;&amp;
chmod 644 doc/{lst,ProgrammerManual/Tutorial}/* &amp;&amp;

install -v -m755 -d /usr/share/doc/unixODBC-&unixodbc-version; &amp;&amp;
cp      -v -R doc/* /usr/share/doc/unixODBC-&unixodbc-version;</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <option>--enable-drivers</option>: This parameter enables building
      the drivers that were installed by default in previous versions.
    </para>

    <para>
      <option>--enable-drivers-conf</option>: This parameter enables
      building the driver configuration libraries that were installed
      by default in previous versions.
    </para>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring unixODBC</title>

    <sect3 id="unixodbc-config">
      <title>Config Files</title>
      <para><filename>/etc/unixODBC/*</filename></para>

      <indexterm zone="unixodbc unixodbc-config">
        <primary sortas="e-etc-unixODBC-">/etc/unixODBC/*</primary>
      </indexterm>
    </sect3>

    <sect3><title>Configuration Information</title>

      <para>
        The files in <filename class='directory'>/etc/unixODBC</filename>
        are meant to be configured by the system administrator (or the ODBC site
        administrator if appropriate privileges are granted to
        <filename class='directory'>/etc/unixODBC</filename>). These files
        are not meant to be directly edited. The ODBC installer library is
        responsible for reading and writing the
        <application>unixODBC</application> config files.
      </para>

      <para>
        Unfortunately, there are no many <command>man</command> or any
        <command>info</command> pages for the various programs available in the
        <application>unixODBC</application> package. Along with the information
        in the <quote>Short Descriptions</quote> below and the documentation
        installed in <filename
        class='directory'>/usr/share/doc/unixODBC-&unixodbc-version;</filename>,
        there are many <filename>README</filename> files throughout the source
        tree where the use and functionality of the programs can be found.
        Additionally, you can use the parameter <option>-?</option> for syntax
        and usage information. Lastly, the <application>unixODBC</application>
        web site at <ulink url="http://www.unixodbc.org/"/> has very good
        information.
      </para>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          dltest, isql, iusql, odbc_config, odbcinst, and slencheck
        </seg>
        <seg>
          libodbc.so, libodbccr.so, and libodbcinst.so
        </seg>
        <seg>
          /etc/unixODBC and
          /usr/share/doc/unixODBC-&unixodbc-version;
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="dltest">
        <term><command>dltest</command></term>
        <listitem>
          <para>
            is a utility used to check a share library to see if it can be
            loaded and if a given symbol exists in it.
          </para>
          <indexterm zone="unixodbc dltest">
            <primary sortas="b-dltest">dltest</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="isql">
        <term><command>isql</command></term>
        <listitem>
          <para>
            is an utility which can be used to submit SQL to a data source and
            to format/output results. It can be used in batch or interactive
            mode.
          </para>
          <indexterm zone="unixodbc isql">
            <primary sortas="b-isql">isql</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="iusql">
        <term><command>iusql</command></term>
        <listitem>
          <para>
            provides the same functionality as the <command>isql</command>
            program.
          </para>
          <indexterm zone="unixodbc iusql">
            <primary sortas="b-iusql">iusql</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="odbc_config">
        <term><command>odbc_config</command></term>
        <listitem>
          <para>
            is used to find out details about the installation of
            the <application>unixODBC</application> package.
          </para>
          <indexterm zone="unixodbc odbc_config">
            <primary sortas="b-odbc_config">odbc_config</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="odbcinst">
        <term><command>odbcinst</command></term>
        <listitem>
          <para>
            is an utility created for install script/RPM writers. It is a
            command line interface to key functionality in the
            <filename class='libraryfile'>libodbcinst</filename> library. It does
            not copy any files (i.e., libraries) but it will modify the ODBC
            System Information for the user.
          </para>
          <indexterm zone="unixodbc odbcinst">
            <primary sortas="b-odbcinst">odbcinst</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
