The Setup Routines For The Ibm Db2 Odbc Driver

I have had a number of requests from people wanting to connect to IBM's DB2 fromLinux via unixODBC. This short document details what I know about this at themoment. If anyone can contribute more imformation then please contact me at theaddress at the end of the document.

  1. The Setup Routines For The Ibm Db2 Odbc Driver Could Not Be Found
  2. The Setup Routines For The Ibm Db2 Odbc Driver
  3. The Setup Routines For The Ibm Db2 Odbc Driver For Windows
  4. The Setup Routines For The Ibm Db2 Odbc Driver Could Not Be Loaded

This document originally refered to the 6.1 version of DB2, but there are extra details for 7.1 and 9.1

The ODBC driver manager used on IBM i is called unixODBC. It is the same driver manager that is used on most Linux distributions, so if you have set up ODBC there in the past, these instructions should. Presents procedures for setting up your environment to support the ODBC driver. For help configuring the ODBC driver, start the ODBC administration program from the IBM® i Access for Windows program group, and refer to the online help. The IBM i Access ODBC driver is an ODBC version 3.5 compliant driver.

First, install the DB2 Client access package from IBM it will install the IBM CLI driver, this works with unixODBC as a ODBC driver.

Using the install in the Client Access package, setup the client access to give you a instance name (ie db2inst1), then setup your odbcinst.ini entry like this. Twerk it busta rhymes mp3 free download.

The DontDLClose is required to avoid a problem in the driver when dynamically loaded (I suspect its registering a exit function which isn't being called).

Then setup your odbc.ini like this.

Then when it comes to connecting, you MUST have the environment variable DB2INSTANCE set to a vaild db2 instance, so for instance to connect with isqlThat should be all there is to it.

Version 7.1

Since originally creating this document, IBM have released a new version of DB2 7.1. I have tried the 7.1 build and with a couple of changes, the same method seems to work fine. The only difference being the name of the package, where the documentused to refer to the DB2 Client access package, the CLI driver is now to be found in the DB2 Personal Developer's Edition V7.1.

If using the 7.1 build the path to the library is now

I have also found that you need to add '/usr/IBMdb2/V7.1/lib' to /etc/ld.so.conf.

It has been reported that this installation doesn't work in some situations. the attempt to open the driver fails, and cannot find a symbol sqltevents in libdpdcf.a. I hav'nt had this problem, so I wonder if there is a difference between platform, or builds of the DB2 instance. If anyone has any more info on this let me know.

Another useful hint. Somewho has been using PHP+DB2 on AIX via unixODBC to a BIG IBM server (4 processors, bags of core etc), and finding it was slow. It turns out there is a bug in IBM's TCP/IP stack. after looking at this and setting thisTo quote '.. the difference was UNBELIEVABLE !!!'. Thanks Eric.

Version 9.1

And yet more..

The current installation should look like this

IBM supply a script that sets DB2INSTANCE and LIBPATH. Here's what IBM suggests you put in your .bashrc if the DB2 instance you want to talk to is in /home/db2inst1:

Version 9.1

As is described in this document IBM now have a different lib for 32 and 64 bit operation. So for 32 bit useor 64 bitIts also worth remembering that unixODBC allows you to have both 32 and 64 bit drivers installed in the same setup, and the driver manager will pick the right one from a shared set of ini filed

Version 10.1 Fix Pack 1 (IBM Data Server Driver for ODBC and CLI, 64-bit)

(Thanks Björn)

Getting the driver

Download page: http://www-01.ibm.com/support/docview.wss?rs=4020&uid=swg27016878

Preferrably choose the latest version from the 'IBM Data Server Client Packages, Fix Packs by version', e.g. 'Version 10.1 Fix Pack 1'.

Then choose 'IBM Data Server Driver for ODBC and CLI (64-bit)', 'View all'.

The Setup Routines For The Ibm Db2 Odbc Driver

Then choose your platform under 'Platform', e.g. 'AIX 64-bit, pSeries' and check the appropriate checkbox, e.g. 'fix pack: DSClients-aix64-odbc_cli-10.1.0.1-FP001,
IBM Data Server Driver for ODBC and CLI (AIX 64 bit) V10.1 Fix Pack 1'. Click 'Continue' and login with your IBM ID (or sign up for a new one).

Download the file, e.g. 'v10.1fp1_aix64_odbc_cli.tar.gz'.

Untar to a suitable location, e.g. /usr/local/src/DB2. This will create a 'db2_cli_odbc_driver' subdirectory, with another subdirectory 'clidriver' in it.

Create debug/diagnostic directories, as those are missing:

64-bit unixODBC on IBM AIX

..with gcc, set:

..although -q64 -DBUILD_REAL_64_BIT_MODE do not appear to influence anything (any longer).

Then configure with (e.g.):

Ask libtool not to hardcode library paths into libraries before installing:

Further enforce this by modifying ltmain.sh and libltdl/config/ltmain.sh using unixODBC-2.3.1-libtool.patch (attached with this e-mail).

Then compile and install using GNU make:

Make sure to extract the archive members of the libraries and to create .so links to them:

General unixODBC settings on IBM AIX

Your /etc/environment (or similar evironment variable-setting profile) should probably set the ODBCINI environment variable to point out odbc.ini:

(You will need to logout and login again for the changes to take effect, of course.)

Configuring the driver

For AIX, odbcinst.ini should contain:[db2_odbc_driver]Description = IBM DB2 ODBC driver (64-bit)Driver = /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/lib/db2o.oFileUsage = 1DontDLClose = 1

The db2o.o driver is the one to use for IBM AIX. (There is no need to extract anything from libdb2.a or similar, as in some previous versions.)

Then create a /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/cfg/db2cli.ini file containing one stanza for each data source. The result could look something like this:

(This connects to a DB2 server on my.database.server.com TCP port 451234 using the supplied credentials.)

The stanzas should of course have identical names to those of the data sources in odbc.ini.

Configuring the data source

odbc.ini should contain a data source specifying a DMEnvAttr attribute:

This points out the installation path of the driver.

Debugging

If things don't work and you want some further clues:

Add:

..to each DB2 data source in odbc.ini.

Add the following to odbcinst.ini:

Add the following to /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/cfg/db2cli.ini:

Perform an isql connection attempt and trace it via the truss command:

Then have a look at /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/db2dump/db2diag.log, /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/db2dump/db2trace.log, /usr/local/src/DB2/db2_cli_odbc_driver/odbc_cli/clidriver/db2dump/a.trc (from truss, e.g. look out for ENOENTs somewhere at the end) and /tmp/sql.log (from unixODBC).

Hopefully this will give you some clues as to why things don't work, if they don't work.

If this is of any help to someone, good, any problems let me know. Thanks to Harold Lee for helping me keep this doc somewhere near up to date.

Midnight texas tiger

Nick Gorham

On this page, you find information about downloading and installing the drivers you need to be able connect to data sources with the connector for IBM DB2 in Spotfire.

Preparations

Before downloading and installing any driver software for use with this connector, read the system requirements for the connector for your version of Spotfire. Make sure that your database version and driver version is supported in your version of Spotfire.

Remember that additional requirements and third party dependencies might apply for using the drivers. Refer to the official documentation from the driver vendor for more information.

The Setup Routines For The Ibm Db2 Odbc Driver Could Not Be Found

Supported data sources

You can use the Spotfire Connector for IBM to connect to the following data source types:

Driver information

To connect to IBM DB2, you must install the IBM DB2 ODBC driver on your computer.

The driver is included in the IBM Data Server Driver Package, which available for download, for registered users, from IBM.

Downloading the IBM DB2 ODBC driver

The Setup Routines For The Ibm Db2 Odbc Driver

Prerequisites: You must be a registered IBM user to download the driver files. Contact your IBM account manager to gain access to this driver.

  1. In a web browser, go to the IBM Support download page.

  2. In the list of donwloads, locate the IBM Data Server Driver Package.

Note: When you obtain third-party software or services, it is your responsibility to ensure you understand the license terms associated with such third-party software or services and comply with such terms.

To connect to IBM Big SQL, you use the connector for IBM DB2 (Add content > Connect to > IBM DB2).

The Setup Routines For The Ibm Db2 Odbc Driver For Windows

To be able connect to IBM Big SQL, you must install the IBM DB2 ODBC driver. See the download instructions above.

So, I'm all set up.. What do I do now?

If you want to learn more about how to use this connector, see the User's Guide for TIBCO Spotfire® Analyst. There you'll find everything from basic instructions to detailed information about how you can load and analyze data in Spotfire.

The Setup Routines For The Ibm Db2 Odbc Driver Could Not Be Loaded