ODBC support is available for the Cloudscape 10 and Derby databases as an IBM® DB2 Run-Time Client. The use of Derby, Version 10.1 and 10.0, with ODBC is a supported platform for Windows® and available as a beta for Linux®. This article discusses platforms, system requirements, configuration, and where to download the free driver.

Susan L. Cline (clines@us.ibm.com), Cloudscape Engineer, IBM

Susan Cline works in Cloudscape to develop technical content for Cloudscape developers and users, with an emphasis on the integration of Eclipse and Derby tooling.



01 December 2005 (First published 23 September 2004)

ODBC for Cloudscape and Derby 10.0 and 10.1 databases

IBM Cloudscape, Version 10, and Apache Derby databases can be used as a backend datasource for ODBC applications using a freely downloadable DB2 Run-Time Client. Additionally, the Run-Time Client provides a command line processor, the DB2 Command Line Processor (CLP), which allows SQL statements to be executed against a Derby database.


DB2 Run-Time Client packaging options

The 8.2 version of the DB2 Run-Time Client is available in multiple packaging options depending on the functionality required and platform availability. All of the options discussed here provide ODBC support for Derby databases. However, using the DB2 Run-Time Client on Linux is a beta solution.

A list of the packaging options and supported platforms is shown below in Table 1. To select which version to download, first find the platform you wish to install the DB2 Run-Time client on, and then check the available packaging options for this platform.

Table 1. DB2 Run-Time Client packaging and platform support
PlatformFull VersionLite Version"Minimal" Version
Windows
Windows 2000XX
Windows 2003
X
Windows XPXX
Windows 98X

Windows MeX

Windows NTX

Linux
SUSE Linux Enterprise Edition 9X
X
Red Hat Enterprise Linux AS R3X
X
Linux on IntelX

Linux on S/390 and zSeriesX

Unix
AIX (Versions 4.3 and 5)X

HP-UX Version 11iX

HP-UX Version 11iX


DB2 Run-time Client feature comparision

The table below shows a comparision between the features, sizes and limitations between versions. All provide ODBC support for Cloudscape and Derby databases. Regardless of which option you select, only one version can be installed on a single host. Depending on the packaging options available for your platform selected above, the information below will help you make a decision about which version to install.

Table 2. DB2 Run-Time Client feature and size comparisions
PackageDatabase supportFeatures providedDownload size
"Minimal" VersionCloudscape, Versions 10.1 and 10.0
Apache Derby, Version 10.1 and 10.0
DB2 Family Servers
ODBC Support
JDBC
DB2 CLP (Command Line Processor)
18.1 MB
Lite VersionCloudscape, Versions 10.1 and 10.0
Apache Derby, Version 10.1 and 10.0
DB2 Family Servers
"Minimal" features, plus:
OLE DB
.NET Data provider
Redistributable Developer's License
15.4 MB
Full VersionCloudscape, Versions 10.1 and 10.0
Apache Derby, Version 10.1 and 10.0
DB2 Family Servers
DB2 Connect Servers
Lite features, plus:
Command Line Interface (CLI)
Control Center
Configuration Assistant (GUI)
Administrative tools
Client Tools
LDAP Exploitation
MDAC 2.7
SQLJ Support
Additional Communication Protocols
Windows, 85.7 MB
Linux, 197 MB

Download and installation instructions

For the DB2 Run-Time Client Lite and "Minimal" versions, installation and download instructions are below.

Note: The use of Cloudscape with the ODBC driver on Linux platforms is a beta configuration.

Linux downloads and configuration

  • To get the "Minimal" Version of the DB2 Run-Time Client for Linux, download the file db2_clients_linux.zip. The first screen asks you to login and then to accept the license agreement. It appears as though you are downloading Cloudscape Version 10.1, but after accepting the license the next screen will show the db2_clients_linux.zip file with a label of "IBM DB2 Runtime and Application Dev. Clients(Beta) for Cloudscape 10.0".

  • For the DB2 Run-Time Client "Minimal" Version 8.2 for Linux, read the installation and configuration instructions thoroughly. These instructions contain important information about how to install the Run-Time Client, as well as how to catalog the tcpip node and Cloudscape database. You must follow these steps before using Cloudscape from an ODBC application.

  • The DB2 Run-Time client "Full version" for Linux that contains ODBC support for Cloudscape is Version 8.2, which is called V810 FixPak 7. If an existing DB2 installation is being used, this version or higher of the Run-Time client must be available.

    To determine which Version and FixPack you have installed, issue the db2level command:

    Listing 1. Determine which version and FixPack is installed
    linux db2inst1/sqllib> db2level
    DB21085I  Instance "db2inst1" uses "32" bits and DB2
    code release "SQL08020"
    with level identifier "03010106".
    Informational tokens are "DB2 v8.1.0.72", "s040914",
    "MI00086", and FixPak "7".
    Product is installed at "/opt/IBM/db2/V8.1".
  • To run ODBC and Cloudscape on Linux requires unixODBC, available at the unixODBC Web site. (See Resources.)

    The information related to unixODBC is typically installed under /etc/unixODBC and the libraries are under /usr/lib/unixODBC. Below is an example for configuring a "TEST" datasource. Edit /etc/unixODBC/odbcinst.ini:

    Listing 2. Configure a "TEST" datasource
    [DB2]
    Description     = DB2 driver for Linux
    Driver          = /home/db2inst6/sqllib/lib/libdb2.so
    FileUsage       = 3
    [ODBC]
    Trace=yes
    Tracefile=/home/db2inst6/odbcTrace.log

    Create an odbc.ini file under the HOME directory (typically) of the DB2 Client instance and add to that file:

    [ODBC Data Source]
    TEST=IBM DB2 ODBC DRIVER
     
    [TEST]
    Driver=/home/db2inst6/sqllib/lib/libdb2.so

    More information is available at the DB2 Help site (see Resources). The ODBC programs written in Windows will not normally work on Linux out of the box. They will need to be changed and recompiled before running on Linux.

  • To use ODBC and Linux with Cloudscape databases, all database names must be in uppercase.

  • To use ODBC and Linux with Cloudscape databases, all databases must be in derby.system.home. In other words, when connecting to the database, a path cannot be used to specify where the database resides. The database must be located in derby.system.home.

Windows downloads and configuration

  • To get the Lite Version for Windows, download one of the setup.exe files for the DB2 Run-Time Client Lite Version 8.2.x depending on your language requirements.

  • For the DB2 Run-Time Client "Lite" Version 8.2, read the installation and configuration instructions throughly. These instructions contain important information about how to install the Run-Time Client, as well as how to catalog the tcpip node and Cloudscape database. These steps must be followed prior to using Cloudscape from an ODBC application.

  • The DB2 Run-Time Client "Full Version" for Windows that contains ODBC support for Cloudscape is Version 8.2, which is called V810 FixPak 7. If an existing DB2 installation is being used, this version or higher of the Run-Time client must be available.

    To determine which version and FixPack you have installed, issue the db2level command:

    Listing 3. Determine which version and FixPack is installed
    C:\Program Files\IBM\SQLLIB\BIN>db2level
    DB21085I  Instance "DB2" uses "32" bits and DB2 code release "SQL08023" with
    level identifier "03040106".
    Informational tokens are "DB2 v8.1.10.812", "s050811", "WR21362", and FixPak
    "10".
    Product is installed at "C:\PROGRA~1\IBM\SQLLIB".

    This example shows the latest release of the DB2 Run-time client at the time this article was written, which is V810 FixPak 10, Version 8.2.2.

Full Version downloads

You can download fix packs for the Full Version of the DB2 Run-Time Client from the IBM Support site for DB2. When you select your platform on this page, you will see a list of fix packs which includes the DB2 Run-Time Client.


Obtaining help when using Cloudscape and the Run-time Client

Using Cloudscape 10.0 and 10.1 with the DB2 Run-Time Clients on Windows is a supported platform, and Cloudscape customers who wish to purchase or have already purchased technical support are eligible for assistance when using Cloudscape and the DB2 Run-Time Client.

Using Cloudscape with the DB2 Run-Time Client on Linux is in beta. To report problems or ask questions regarding the use of this product combination, please visit the Cloudscape Developers Forum.

Resources

Learn

Get products and technologies

  • unixODBC: Required to run ODBC and Cloudscape on Linux.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=86557
ArticleTitle=Cloudscape and ODBC
publish-date=12012005