"Squirrel SQL" is a great light weight generic SQL client that I have started using for more than 7 years now.
This is how to configure Squirrel SQL 3.3.0 to connect to DB2 server, I have installed IBM DB2 admin client 9.7 - 64 bit software on my Windows 7 enterprise SP1. You will find two types of DB2 drivers APP & NET, most recommended way is to use type 4 JDBC driver (thin) that actually doesn't require client installation, but require proper jar files and associated license.
Steps:
1- Open Driver list from left menu, click the plus sign "Create a New Driver".
2- Type "IBM DB2 Universal Driver" in "Name" textbox.
3- Type "jdbc:db2://<server>:<port>/<dbname>" in "Example URL" textbox.
4- Type "com.ibm.db2.jcc.DB2Driver" in "Class Name" editable dropdown list.
5- Click "Extra Class Path" tab.
6- Click "Add" and select two jar files from %DB2_INSTALL%\java\db2jcc.jar & %DB2_INSTALL%\java\db2jcc_license_cu.jar
7- Click Ok, and we are done defining the driver.
8- Now create an alias for the DB using previous driver and providing URL, username, & password.
Your driver dialog should look like:
This is how to configure Squirrel SQL 3.3.0 to connect to DB2 server, I have installed IBM DB2 admin client 9.7 - 64 bit software on my Windows 7 enterprise SP1. You will find two types of DB2 drivers APP & NET, most recommended way is to use type 4 JDBC driver (thin) that actually doesn't require client installation, but require proper jar files and associated license.
Steps:
1- Open Driver list from left menu, click the plus sign "Create a New Driver".
2- Type "IBM DB2 Universal Driver" in "Name" textbox.
3- Type "jdbc:db2://<server>:<port>/<dbname>" in "Example URL" textbox.
4- Type "com.ibm.db2.jcc.DB2Driver" in "Class Name" editable dropdown list.
5- Click "Extra Class Path" tab.
6- Click "Add" and select two jar files from %DB2_INSTALL%\java\db2jcc.jar & %DB2_INSTALL%\java\db2jcc_license_cu.jar
7- Click Ok, and we are done defining the driver.
8- Now create an alias for the DB using previous driver and providing URL, username, & password.
Your driver dialog should look like:

How do you configure oracle driver for squirrel-sql-3.3.0?
ReplyDeleteDear,
DeleteYou can find the steps here
Thanks for these steps. i did it :)
ReplyDeleteI get this error when I try to connect as above
ReplyDeleteError: DatabaseMetaData information is not known for server DB2/NTSQL09058 by this version of JDBC driver
SQLState: null
ErrorCode: -99999
Do you know the reason?
I have googled yr error, it seems some versions of DB2 client have some issues. I suggest u post yr question on IBM DB2 forum with exact versions of DB2 & Java
DeleteI am facing the same error...
DeleteCan you help me if you found something....
I have installed new version of squirrel-sql.
Try posting in this forum http://www.dbforums.com/db2/
DeletePlease when you post, you need to mention exactly the following:
1- Exact version of Operating system.
2- Exact JDK version including (86 or 64) installed and used by SQuirrelSQL (Squirrel SQL is not your issue, i is between Java & DB2).
3- Exact IBM DB2 client version
Thank You Ashraf Fouad....!
ReplyDeleteIt's helped me...
Hey thanks a lot. This was very very helpful
ReplyDeleteAny time, happy to help.
ReplyDeleteThanks for the wonderful set of steps to configure SQuirrelSQL with DB2.
ReplyDeletethanks for that post, v helpful
ReplyDelete