This installation guide walks you through the installation of the Enterprise Edition ODBC Driver for Oracle to a Personal or Application Server host functioning as a client to an Oracle Database Server.
Step 1: Download the Installer Archive
- Visit the OpenLink ODBC Enterprise Edition Driver Download Page to download the appropriate ODBC driver for Oracle.
- Alternatively,
curl
can be used to download the installer archives andinstall.sh
script directly:
curl -O https://download3.openlinksw.com/uda/components/misc/install.sh
curl -O https://download3.openlinksw.com/uda/components/8.0/x86_64-generic-linux-glibc25-64/oplodbc.taz
curl -O https://download3.openlinksw.com/uda/components/8.0/x86_64-generic-linux-glibc25-64/ora120_mv.taz
curl -O https://download3.openlinksw.com/uda/components/8.0/x86_64-generic-linux-glibc25-64/oplrqb.taz
curl -O https://download3.openlinksw.com/uda/components/8.0/x86_64-generic-linux-glibc25-64/odbc_admin.taz
Step 2: Pre-Installation Configuration
Software Requirements
- If not already in place already, Download the Oracle Instant Client software for Linux.
- Installed the Oracle Instant Client on the same machine as the OpenLink Oracle Database agent (
ora120_mv
), setting thePATH
andLD_LIBRARY_PATH
environment variables to point to the location where the required binaries and shared libraries are installed –
export PATH=/opt/oracle/instantclient_21_10:$PATH
export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_10:$LD_LIBRARY_PATH
Oracle Client Configuration Requirements
The following
- The following details for the target Oracle Database needs to be determined –
username/password
= your DB credentialshostname
= the database server address (IP or DNS)port
= usually1521
service_name
= the service name (not SID) of the Oracle DB
- The Oracle Client Connect string format for the database connection is then –
username/password@//hostname:port/service_name
Step 3: Installation
- Log onto the target machine for the installation and create a suitable OpenLink installation directory
{OPENLINK_INSTALL}
. - Copy all the downloaded components to the
{OPENLINK_INSTALL}
directory, which are theinstall.sh
,oplrqb.taz
,oplodbc.taz
,odbc_admin.taz
,ora120_mv.taz
files. - Install OpenLink components using the
install.sh
shell script with the command –
sh install.sh
- Take care to enter correct information when prompted pertaining to ports, passwords, etc and ensure that you note these down for future use.
- The installation should finish without error.
Step 4: Configuration
- To setup the OpenLink environment, from the
{OPENLINK_INSTALL}
run the command –
. ./openlink.sh
- Open the file
{OPENLINK_INSTALL}/bin/oplrqb.ini
with a suitable text editor such asvi
. - Locate and edit the [Environment ORACLE120] section in the
oplrqb.ini
file and set theORACLE_HOME
andLD_LIBRARY_PATH
environment variable to point to your Oracle Instant Client installation directory, such that they are always set when the Oracle Database Agent is invoked –
[Environment ORACLE120]
ORACLE_HOME = /opt/oracle/instantclient_21_10
;ORACLE_SID =
;ORACLE_SERVER =
;TWO_TASK = P:
;ODBC_CATALOGS = Y ; Uncomment after loading odbccat10.sql
;MULTIPLEX_LDA = 5 ; Allow 5 OpenLink clients on a single lda
;OPL_USR_TBLS_FIRST = Y ; Sort SQLTables starting with user tables
SHOW_REMARKS = N ; Retrieve SQLColumns REMARKS field
CURSOR_SENSITIVITY = LOW ; Set to HIGH after loading odbccat10.sql
;OCI_PREFETCH_ROWS = 100 ; Number of rows to prefetch
;OCI_PREFETCH_MEMORY = 65535 ; Amount of memory to use for prefetching
LD_LIBRARY_PATH = /opt/oracle/instantclient_21_10 ; Find shared libraries
SHLIB_PATH = /opt/oracle/instantclient_21_10 ; Find HP/UX shared libraries
LIBPATH = /opt/oracle/instantclient_21_10 ; Find AIX shared libraries
;NLS_LANG = AMERICAN_AMERICA.UTF8 ; Uncomment for Unicode connections
- Place the License file(s) (
oplrqb.lic, oracle12.lic
) either purchased or obtain during the evaluation download process in the{OPENLINK_INSTALL}/bin
directory. - Start the OpenLink License Manage (
oplmgr
) by going to the{OPENLINK_INSTALL}/bin
directory and running the command –
./oplmgr +start
- Start the OpenLink Request Broker (
oplrqb
) by going to the{OPENLINK_INSTALL}/bin
directory and running the command –
./oplrqb -v ;;; To start in background mode
or
./oplrqb -fd ;;; To start in foreground debug mode
Step 5: Create Data Source Name (DSN)
- Open the file
{OPENLINK_INSTALL}/bin/odbc.ini
with a suitable text editor such asvi
. - Locate and edit the sample OpenLink Multi-Tier ODBC data source (DSN) called
[OpenLink]
created during the installation process and edit as follows –
[OpenLink]
Driver = {OPENLINK_INSTALL}/lib/oplodbc.so
ServerType = ORACLE120
Host = localhost:5000 ;;; replace "localhost" with the hostname the OpenLink Broker (oplrqb) runs on if not on the same machine
Database =
Username = {username}
Password = {password}
Options = {//hostname:port/service_name}
FetchBufferSize = 99
ReadOnly = no
DeferLongFetch = no
JetFix = no
WideAsUTF16 = Y
Description = Sample Oracle Multi-Tier Connection
Step 6: Test connection
Using the iODBC Runtime Environment
- 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=OpenLink;UID={username};PWD={password}"
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>
- 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>
- The Oracle ODBC Driver is now ready for use with target ODBC application(s).
Using the unixODBC Runtime Environment
- When using the unixODBC Driver Manager the
WideAsUTF16 = Y
parameter needs to be added to the target ODBC DSN, if not in place already, to enable successful connections with applications built using the unixODBC SDK, e.g., itsisql
test application –
$ isql OpenLink {username} {password}
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| echo [string] |
| quit |
| |
+---------------------------------------+
SQL> select count(*) from orders
+------------------+
| (count(*)) |
+------------------+
| 23 |
+------------------+
SQLRowCount returns -1
1 rows fetched
SQL>