Installation Guide for OpenLink ODBC-JDBC Bridge Driver (Lite Edition) for Linux

This installation guide walks you through the installation of the Lite Edition ODBC to JDBC Bridge Driver to a Personal or Application Server host functioning as a client to a database that’s accessible via its native JDBC Driver.

Lite Edition Architecture

Step 1: Download the Installer Archive

  1. Visit the OpenLink ODBC Lite Edition Driver Download Page to download the appropriate ODBC driver for Informix.
  2. Alternatively, curl can be used to download the installer archives and install.sh script directly:
curl -O https://download3.openlinksw.com/uda/components/misc/install.sh
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/jdbc_lt.taz  
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/odbc_admin.taz

Step 2: Pre-Installation Configuration

  • A 64-bit JVM must be installed and configured.
  • A third-party or native JDBC drivers that connects to the target database must be available
  • The JDBC Driver must be installed on the same machine as the Multi-Tier “Enterprise” Edition Request Broker and Bridge Agent(s) for JDBC Data Sources.
  • The JDBC driver jar file (or a symbolic link to it) must be included in the active CLASSPATHenvironment variable.
  • The JDBC driver class name must be known.
  • The JDBC connection URL that connects to your target JDBC Data Source must be known.
  • The location of the libjvm.so shared library using by the OpenLink JDBC Bridge agent must be set in the LD_LIBRARY_PATH environment variable
  • Generally, the latest JVM from http://java.com/ is the best choice.

Step 3: Installation

  1. Log onto the target machine for the installation and create a suitable OpenLink installation directory {OPENLINK_INSTALL}.
  2. Copy all the downloaded components to the {OPENLINK_INSTALL} directory, which are the install.sh, odbc_admin.taz, jdbc_lt.taz files.
  3. Install OpenLink components using the install.sh shell script with the command –
 sh install.sh
  1. Take care to enter correct information when prompted pertaining to ports, passwords, etc and ensure that you note these down for future use.
  2. The installation should finish without error.
Step 4: Configuration
  1. Open the file {OPENLINK_INSTALL}/openlink.sh with a suitable text editor such as vi.
  2. Locate the LD_LIBRARY_PATH shared library environment variable setting and set to point the location of the required libjvm.so shared library determined in Step 2
LD_LIBRARY_PATH = {Path to libjvm.so file}:$LD_LIBRARY_PATH
  1. To setup the OpenLink environment, from the {OPENLINK_INSTALL} run the command –
. ./openlink.sh
  1. Open the file {OPENLINK_INSTALL}/bin/openlink.ini with a suitable text editor such as vi.
  2. Locate the [Environment Jdbc1.8] section for setting the driver specific JDBC configuration and edit to reflect your environment, setting the CLASSPATH to the location and name of the JDBC Driver jar file determined in Step 2
[Environment Jdbc 1.8]
CLASSPATH         = {JDBC Driver JAR file}:.
  1. Place the License file (jdbc_lt.lic) either purchased or obtain during the evaluation download process in the {OPENLINK_INSTALL}/bin directory.
  2. Start the OpenLink License Manage (oplmgr) by going to the {OPENLINK_INSTALL}/bindirectory and running the command –
./oplmgr +start

Step 5: ODBC Data Source

  1. Open the file {OPENLINK_INSTALL}/bin/odbc.ini with a suitable text editor such as vi.
  2. Locate and edit the sample OpenLink ODBC -JDBC Bridge data source (DSN) called [jdbc18_lite_unicode] created during the installation process and edit as follows –
[jdbc18_lite_unicode]
Driver          = {OPENLINK_INSTALL}/lib/jdbc18_mt_lu.so
ServerType      = Jdbc 1.8
Username        = {username}
Password        =  {optional password}
Database        = {JDBC Driver class name}
Options         = {JDBC connection URL string}
FetchBufferSize = 99
ReadOnly        = no
DeferLongFetch  = no
JetFix          = no
Description     = Sample Jdbc 1.8 Lite Connection

Replace items in curly brackets ie {...} with the actual values for the target JDBC accessible database determined in Step 2 above.

Step 6: Test connection

Using the iODBC Runtime Environment
  1. Use the OpenLink iODBC iodbctest sample tool packaged with the HTTP-based OpenLink ODBC Administrator as follows to make a test connection –
$ cd {OPENLINK_INSTALL}
$. ./openLink.sh 
$ iodbctest "DSN=jdbc18_lite_unicode;UID={username};PWD=xxxxxxxx"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0507.0105
Driver: 08.02.1217 OpenLink Generic ODBC Driver (oplodbc.so) 

SQL>
  1. SQL statements can now be issued directly against the target database from the SQL> prompt –
SQL> select count(*) from orders

(count(*))       
-----------------
23               

 result set 1 returned 1 rows.

SQL>
  1. The ODBC to JDBC Bridge Driver is now ready for use with target ODBC application(s).
Using the unixODBC Runtime Environment
  1. When using the unixODBC Driver Manager the WideAsUTF16 = Y parameter needs to be added to the target ODBC DSN to enable successful connections with applications built using the unixODBC SDK, e.g., its isql test application –
$ isql jdbc18_lite_unicode {username} {password}
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| echo [string]                         |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from orders              
+------------------+
| (count(*))       |
+------------------+
| 23               |
+------------------+
SQLRowCount returns -1
1 rows fetched
SQL>

Additional Information