I created this guide to help people prepare for connecting to DB2 Express from WAS 8.x


gunzip db2_v101_linuxia32_expc.tar.gz

tar -xvf db2_v101_linuxia32_expc.ta



I just used password since this is a lab

I used password again

I used password again

Click Finish

Installing IBM Data Studio

Now we are going to install the IBM Data Studio

gunzip ibm_data_studio_standalone_linux_V311.tar.gz

tar -xvf ibm_data_studio_standalone_linux_V311.tar

Running the IBM Data Studio Admin Client

cd /opt/IBM/DSAC3.1.1


In local VM this option crashed with a core dump? Must be something to do with Java/browser?

Anyway I then decided to install the SAMPE data base using command line tools


Login into the Linux machine as dbinst1 with an X11 session

Run the first steps console to create the SAMPLES Database


Preparing for a DB” JDBC Provider in WAS 8.x

Path to the DB2 Client Libraries: by default these libraries are in /opt/ibm/db2/V10.1/java on the server where you installed DB2 Express. WebSphere Application Server will need db2jcc.jar, db2jcc_license_cu.jar.

Creating a JDBC Provider in WAS 8.x

We presume you have installed WebSphere Application Server 8.x

Edit the class path



Click Apply, then Next

Click Finish, then Save

Result …

Create a J2C Alias for use with the Datasource

We need o remember that DB” uses operating system users. I used db2inst1 as this is the user we used earlier to create the SAMPLE DB2 database using the First Steps Console.

We can create more users later as required, this will be covered in another article.

Result after saving

Create JDBC Datasource using the J2C Alias

I have chosen to use Cell scope as my nodes are not runnining my WAS ND Cell, and I just want to test connectivity to the drivers

Click Finish and then Save

Test connection…

This error was because me modified the class path, but did not allow the wizard to create the Was variables.

If we look at the provider again we can see that the class path refers to ${DB2_JCC_DRIVER_PATH} we need to create the variable at call cope.

We can see it is blank, due to the way I edited in the wizard. The reason for this is that when WAS is shipped it presumes that certain other products such as DB2 (non express) are used by default and so we need to always setup the provider to suit open-source or express type situations.

Let us update the variable with the correct path. Typically this is : /opt/ibm/db2/V10.1/java for DB2 Express C


Click Apply and Save

Re-test Datasource

The test connection operation failed for data source DB2 SAMPLE DB on server dmgr at node Cell01Dmgr01 with the following exception: java.sql.SQLInvalidAuthorizationSpecException: [jcc][t4][2013][11249][4.13.127] Connection authorization failure occurred. Reason: User ID or Password invalid. ERRORCODE=-4214, SQLSTATE=28000 DSRA0010E: SQL State = 28000, Error Code = -4,214. View JVM logs for further details.

This is because I made a spelling in my J2C alias it should have been db2inst1 not dbinst1.

Once corrected we get a successful test







Leave a Reply