 | Level: Introductory Susan L. Cline (clines@us.ibm.com), Cloudscape Engineer, IBM
23 Sep 2004 Updated 01 Dec 2005 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.
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
| Platform | Full Version | Lite Version | "Minimal" Version | | Windows | | Windows 2000 | X | X |
| | Windows 2003 |
| X |
| | Windows XP | X | X |
| | Windows 98 | X |
|
| | Windows Me | X |
|
| | Windows NT | X |
|
| | Linux | | SUSE Linux Enterprise Edition 9 | X |
| X | | Red Hat Enterprise Linux AS R3 | X |
| X | | Linux on Intel | X |
|
| | Linux on S/390 and zSeries | X |
|
| | Unix | | AIX (Versions 4.3 and 5) | X |
|
| | HP-UX Version 11i | X |
|
| | HP-UX Version 11i | X |
|
|
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
| Package | Database support | Features provided | Download size | | "Minimal" Version | Cloudscape, 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 Version | Cloudscape, 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 Version | Cloudscape, 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
- "IBM Cloudscape Version 10.1" (developerWorks, August 2005) introduces the latest version of Cloudscape.
- "ODBC Programming using Apache Derby" (developerworks, September 2004) provides in-depth detail about programming applications using ODBC and Apache Derby.
- DB2 Help site: Setting up the UNIX ODBC environment: Get help setting up UNIX client access to DB2 for ODBC applications.
- "Quick Beginnings for DB2 Clients, Version 8.2" (IBM, 2004) explains further some of the differences between the DB2 Run-Time Client products.
- The ODBC Programmer's Reference, Introduction to ODBC (Microsoft Inc., 2004) gives an overview of ODBC, what it is, and why it was created.
- developerWorks DB2 zone: Learn more about DB2. You'll find technical documentation, how-to articles, education, downloads, product information, and more.
Get products and technologies
- unixODBC: Required to run ODBC and Cloudscape on Linux.
Discuss
About the author  | |  | 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. |
Rate this page
|  |