SQuirreL SQL Client-How to Install,Configure and Connect to DB2

Hi Friends,

I was thinking of accessing mainframe database by using some freeware tool to run basic queries without using the licensed hummingbird software and here I got one, Squirrel SQL Client. I installed it in my system and made necessary configuration to talk to mainframe db2 LPC tables.

SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc.

This document will demonstrate how install the client and configure it to connect to and work with a DB2 database. The steps for configuring the SQuirreL SQL Client to work with any other database management system will be very similar.

The SQuirreL SQL Client is a Java application, and as such, it requires a Java 6 runtime environment (JRE) which can be downloaded from Oracle. 
Once the Java 6 runtime environment is installed, the install jar for the SQuirreL SQL Client can be found here: http://www.squirrelsql.org/#installation.

Double-click on it to launch the default application i.e JAVA “jar” file; the installer will display a welcome dialog as shown in Figure 1.

Click the “Next” button again, and the dialog prompts for a path to the location where the application should be installed.

Click the “Next” button to continue the installation. The dialog now presents a list of “packs” that can be installed, which include required software as well as optional plug-ins.

A plug-in is usually a piece of software that can be added (or plugged in) to the application to extend its capabilities. The SQuirreL SQL Client installer ships database-specific plug-ins for each of the major databases which allow the application to work optimally with the corresponding database.
The “Base” pack is the only one required for installation. However, the “Standard” pack is a group of plug-ins that is optional, but highly recommended and pre-selected.

Now that the SQuirreL SQL Client application is installed, we will launch it and configure it to connect to a LPC DB2 DEV database.
Now we can configure the DB2 HIT driver in the SQuirreL SQL Client. In the main window, there are two buttons on the far left-side of the application entitled “Aliases” and “Drivers”. Click on the “Drivers” button and the drivers panel will appear. This panel contains templates for each of the database product that is known to have a JDBC driver that can be loaded into the SQuirreL SQL Client .

Click on driver tab and below screen will pop up. Select the squirrel-sql.jar file as Java access class path. Select the driver from drop down of Class path as shown below.


Click on Extra Class Path tab and below screen will pop up as shown below.

Select the hitjdbcdb2-3.59.jar file from HIT Driver folder as Extra class path. Select the driver from drop down of Class path as shown below

Here  I have used the URL as
jdbc:db2://;rdbname=GBLDB2D;package_collection_id=NULLID;catalog_qualifier = ODBAD

Please note this URL is same we used for CDP(Class Data Pump) for accessing mainframe DB2 table through IMR/CAS. And my LPC user Id and password to connect to dev db2 table through thin layer using HIT Driver.

Click on Test Button to test the connection of Squirrel SQL client with Db2 database.

Now that we have connected to the database, click on the SQL tab to access the SQL script editor. The following SQL statements should be typed into the script editor, ensuring that there is one line of white space between each statement and the next. Here, I have used to query the fetch first 100 rows from claim detail table from Dev Environment and was able to retrieve it.
This has been a short introduction to installing the SQuirreL SQL Client and connecting to a DB2 database. If anybody has questions or any specific problems on using the above Squirrel SQL client please let me know. Also if anybody has used this free tool before in a different way to connect to some other database, please share your understandings.

Questions/Suggestions/Comments are always welcome.


Share your comment

%d bloggers like this: