Jump to: navigation, search

ODBC Drivers Non-Windows

For all non-Microsoft Windows platforms (AIX 32/64 bit, Linux 32/64 bit, Solaris 10), deploying an integrated Database Capture Point also requires installing a unixODBC (unixodbc.org) 2.3.0 driver manager and DSN configuration for a particular driver and a particular connection.

See also some general information on the use of ODBC Drivers with the Database Capture Point.

This section details how to install the drivers on non-Windows platforms. The table below lists the combinations of databases and operating systems on which native drivers were successfully tested.

Native Drivers
Solaris Linux 32 Linux 64 AIX 32 AIX 64
DB2 Yes Yes Yes Yes Yes
Oracle Yes Yes Yes Yes Yes

unixODBC Installation

To install unixODBC, download the unixODBC source code at http://www.unixodbc.org/download.html and follow the instructions for configuring and making the unixODBC installation. If a location for unixODBC other than the default is required, run the configure script with the option --prefix to change the default location. You might need to modify some system variables for a successful unixODBC installation. The changes are outlined below.

Here we define the variable $UNIXODBC, denoting the path to the unixODBC installation. This variable will be used in the sections to follow. Another variable, $HOMEDIR, will be used as a substitute for the user's home directory.

Solaris 64

You must run the following three commands before starting the unixODBC configure script:

  • export CFLAGS="-xarch=v9 -xchip=ultra3 -xO3 -Xa -xstrconst -dalign -xF"
  • export LDFLAGS="-xarch=v9"
  • export ac_cv_sizeof_long=8

A successful unixODBC installation has been verified on the following compiler: "cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/2"?.

AIX 64

You must run the following four commands before starting the unixODBC configure script:

  • export CCC=xlc_r
  • export CC=xlc_r
  • export CFLAGS=-q64
  • export OBJECT_MODE=64
Important
In instances where IBM Data Server Driver for ODBP and CLI v9.7 Fix Pack 4 will be used to connect to a DB2 database from an AIX 64-bit host, the following patching of unixODBC 2.3.0 code is required to mitigate a possible defect in the IBM driver for AIX 64-bit. After running the configure script and before running make, modify the DriverManager/driver_manager.h file, so that the following two lines:
  • #define DRV_SQLHANDLE SQLHANDLE
  • #define DRV_SQLHDESC SQLHDESC

are replaced with the following lines:

  • #define DRV_SQLHANDLE int
  • #define DRV_SQLHDESC int
Warning: This patching needs to be performed for unixODBC installation for AIX 64-bit only if you are using DB2 client driver v9.7 Fix Pack 4. Future versions of the driver may correct the possible cause for the patching.

AIX 32

No extra configuration is required.

Linux 32 and 64

No extra configuration is required, provided that unixODBC is made of the corresponding Linux OS. A successful unixODBC installation has been verified on the following compilers:

  • Linux 64: GNU Make 3.81, gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)
  • Linux 32: GNU Make 3.80, gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)

Driver Downloads

This section details the drivers to be downloaded for each database type.

DB2

Download the DB2 drivers from https://www-304.ibm.com/support/docview.wss?uid=swg21418043.

Download-> DB2 Fixpacks for DB2 LUW and DB2 Connect -> "IBM Data Server Driver for ODBC and CLI"

Oracle

Two packages must be downloaded:

  • Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
  • Instant Client Package - ODBC: Additional libraries for enabling ODBC applications

Unzip both packages to the same directory.

Variable for the driver directory

Define the variable $DRIVER to denote the native ODBC driver installation directory.

For example, if you are using Oracle Instant Client driver, $DRIVER can be the same as /home/user/oracle_driver/instantclient_11_2, and if you are using DB2, $DRIVER can be /home/user/db2driver/db2_cli.

Driver and unixODBC Configuration for Oracle

Select one of the following platforms for detailed instructions on how to configure unixODBC for Oracle:

Driver and unixODBC Configuration for DB2

Select one of the following platforms for detailed instructions on how to configure unixODBC for DB2:

This page was last edited on June 19, 2020, at 14:27.

Feedback

Comment on this article:

blog comments powered by Disqus