Mon, 08 May 2017
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 e.g.
$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:
- Shut down UniVerse.
- Find out where libodbc.extension is located on your system. If you are 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.)
- 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
- Run the relink.uvlibs script:
cd $uvhome/bin relink.uvlibs /usr/local/easysoft/unixODBC/lib
- Start UniVerse.
If after having done this, you are 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 / Easysoft version of the unixODBC Driver Manager.
- If you run,
ENVin your UniVerse shell, do you see the driver manager directories listed? For example:
- What Driver Manager is the UniVerse process linked to? For example:
pldd 100101 100101: /uv/bin/uvsh /uv/bin/libodbc.sl
plddcommand extract shows that UniVerse is still using the UniVerse supplied Driver Manager.