This topic describes how to configure V6 on a Linux or UNIX-based platform to use multiple V8.1 DB2 clients.
Before you begin
WebSphere Application Server, V6 does not configure environment variables for accessing a DB2 database during installation. A database is not a prerequisite. Therefore, the installation and configuration of V6 do not involve database configuration.
You can install multiple DB2 Version 8.x instances on the same Linux or UNIX machine. This topic describes configuring V6 on a Linux or UNIX-based platform to use multiple V8.x DB2 clients.
See the IBM WebSphere Application Server supported hardware, software, and APIs Web site at http://www.ibm.com/software/webservers/appserv/doc/latest/prereq.html for information about required patches for DB2.
Why and when to perform this task
If your WebSphere Application Server, Version 6 machine has only a Version 8.x client installed, and all DB2 data sources defined in WebSphere Application Server access DB2 databases through this client, source the db2profile file in the login profile of your V6 instance owner, invoke the script db2_home/java12/usejdbc2 to use the JDBC2 drivers instead of the default JDBC1 drivers, and put the DB2 lib directory in the java.library.path variable.
WebSphere Application Server instance owner, that is the administrative user who starts WebSphere Application Server | adm00001 |
DB2 client instance owner | db2inst1 |
DB2 client instance home | /export/home/db2inst1 |
Steps for this task
. /export/home/db2inst1/sqllib/db2profile
You can also add the line to the setupCmdLine.sh script of WebSphere Application Server.
Windows platforms support only one DB2 installation. The DB2 environment variables are populated in the system environment automatically. WebSphere Application Server does not need to set these environment variables.
Use the value of the DB2 native library path, such as /export/home/db2v8/sqllib//lib for a V8.x client, or /export/home/db2v8B/sqllib/lib for another V8.x client.
The DB2 lib directory must be on the java.library.path path. Otherwise the application server cannot load the db2jdbc.so library and cannot work with DB2. Even with the DB2 lib directory on the java.library.path path, you must invoke the /home/db2inst1/db2profile environment into the root shell before you start the application server.
In cases where multiple V8.1 clients are installed on a WebSphere Application Server V5.x machine, and you intend to use two or more clients in your V6 Application Servers, you can set DB2 environment variables within each application server, instead of setting them globally as shown previously.
DB2 UDB V8 uses a new client and server communications mechanism that is based on distributed relational database architecture. While the new communications mechanism provides a number of advantages, it also introduces restrictions on the communications capability between DB2 V7 and V8 products.
Because a number of restrictions exist when using a V8 client to communicate with a V7 server, this configuration is not recommended. However, a V7 client can access a V8 server without difficulty.
If you have a WebSphere Application Server application that accesses both a V7 server (on a WebSphere Application Server V5.x machine) and a V8 server (on a WebSphere Application Server V6 machine), use the DB2 V7 client on the WebSphere Application Server V5.x machine to access both the V7 server and the V8 DB2 server.
WebSphere Application Server V6 supports DB2 V8.x but does not support V7.
You can choose to use a V7 client to access a V7 server, and use a V8 client to access a V8 server. This choice results in two versions of DB2 clients.
cd /home/db2inst1/sqllib/bnd db2 connect to v8server db2 bind @db2cli.lst db2 bind @db2ubind.lst db2 terminate
One WebSphere Application Server node can support multiple application server instances. Each application server is essentially a single Java runtime environment, which is one Java virtual machine (JVM). Each JVM can have its own set of environment variables that differ from other application server instances.
You can set DB2 environment variables per application server instance to let each application server instance communicate with a single DB2 client instance. The client instance can have multiple databases cataloged.
Such a configuration means that you cannot have one application server instance communicating with both a V7 client and a V8.1 client. However, you can create another application server instance to communicate with a different DB2 client.
When mapping a data source to an application component, do not mismatch data sources from different DB2 client instances.
For example, if you set the server1 application server instance to run in the DB2 V7 client instance, server1 application components can use only data sources defined under the same V7 client JDBC driver.
WebSphere Application Server V6 supports defining a JDBC provider on different scopes: cell, cluster, node (the default) and server. If you have different DB2 client instances, consider defining them on the server level instead of on the node or cluster level. Server level definitions avoid possible mismatches between the data sources and different DB2 JDBC providers.
Result
You can configure DB2 for use on WebSphere Application Server. Tune your WebSphere Application Server environment as you test it. Test all redeployed applications before moving them into production.What to do next
Return to Task overview: Installing to continue.Related tasks
Task overview: Installing