Configuring DB2 connectivity in Rational Application Developer (RAD)
When you start Web application in RAD 6.0 (Rational Application Developer 6.0), the first thing you need to configure is the database access. In this article, I will show you how to configure DB2 database access in RAD. I assume that DB2 is hosted on a Windows machine.
First thing you need to configure DB2 is the DB2 universal JDBC driver. These can be taken from DB2 server installation or from DB2 connect installation. The files you need are,
db2jcc.jar
db2jcc_license_cu.jar
db2jcc_license_cisuz.jar
Copy these files to a folder. This can be anywhere(I would suggest that you keep this under Rational root folder).
I assume you have already created a server configuration in RAD. Now right click on the server (from server window) and click on “Run administrative console”. This will open up the administrative interface. Typically it runs at “http://localhost:9060/ibm/console/“.
Login by giving any userId. Click on “JDBC providers” under “Resources”. On the right side you will see JDBC providers listed. Click on “New”. Now select values as shown below.

Click on Next. Now fill the driver paths in the Class path as shown below. You need to change this to point to the folder where JDBC jars are stored.

Click on Apply button. Once you have pressed apply button, you will see a Save link above. Click on Save and then click on “Data sources” link on the right side. Fill in as shown below. Please substitute your DB2 server configuration (IP address, DB name and port etc.). Also note the JNDI name, which you will use in your application.


Click on “J2C authentication entries” on the right and fill in as shown below. This should be the DB2 userid/password. After completing this, press apply and return to Datasource screen.

Now you need to select the userid alias you have created from “J2C authentication entries” under component managed authentication alias as shown below. Please note that this is in Datasource screen.

Now you can apply and save the settings. Click on “Test Connection” to verify the settings. If you see a successful message, you are all set for DB2 access from your Web application!
Any problems? Mail me!


