UniVerse tips

Are you evaluating

an ODBC driver?

Yes I am!

UniVerse is linked to the unixODBC Driver Manager, which enables it to connect to third-party databases by using an ODBC driver. For example, UniVerse can use unixODBC and a SQL Server ODBC driver to connect to SQL Server. This blog provides an overview of this process, along with a few things to try if you experience difficulties.

Accessing SQL Server from UniVerse involves the following components:

UniVerse -> unixODBC Driver Manager -> SQL Server ODBC Driver -> SQL Server

UniVerse ships with an ODBC Driver Manager. For example, $uvhome/bin/libodbc.sl. You need to replace this version of the Driver Manager with the one that the SQL Server ODBC driver is installed under. To do this, you:

  1. Shut down UniVerse.
  2. Find out where libodbc.extension is located on your system. If you're using the Driver Manager that was included in the SQL Server ODBC driver distribution, unixODBC is located in install_dir/unixODBC/lib. (By default, install_dir is /usr/local.)
  3. Add the unixODBC directories to your environment (by using LD_LIBRARY_PATH, SHLIB_PATH, LIB_PATH as appropriate). For example:
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/lib
    export LD_LIBRARY_PATH
  4. Run the relink.uvlibs script:
    cd $uvhome/bin
    relink.uvlibs /usr/local/easysoft/unixODBC/lib
  5. Start UniVerse.

If after having done this, you're unable to connect to SQL Server, try the following:

  • If you run:
    file $uvhome/bin/libodbc.extension
    file install_dir/unixODBC/lib/libodbc.extension

    Are the libraries the same architecture. If not, you need to use a verson of unixODBC that matches UniVerse's architecture.

  • If you have multiple UniVerse users, ask all users to finish their UniVerse sessions, before restarting UniVerse to use your system or Easysoft version of the unixODBC Driver Manager.
  • If you run, ENV in your UniVerse shell, do you get the Driver Manager directories listed? For example:
    ENV
    SHLIB_PATH=/usr/lib:/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/lib
  • What Driver Manager is the UniVerse process linked to? For example:
    pldd 100101
    100101: /uv/bin/uvsh
    /uv/bin/libodbc.sl

    This pldd command extract shows that UniVerse is still using the UniVerse supplied Driver Manager.