Configure SQuirreL SQL Client for DB2 for Linux, UNIX, and Windows

Configure SQuirreL SQL Client for DB2 for Linux, UNIX, and Windows

At least for me the default settings for SQuirreL DB2 driver didn’t work. That’s why I documented here how to modify the default “IBM DB2 App Driver” so it works.

Configure the DB2 driver

  1. First I copied db2jcc4.jar from the DB2 instance. In my case the driver was under

    /opt/ibm/db2/V11.1/java/ but you find it as DB2 instance user under $HOME/sqllib/java as well, since this is symlink to installation directory.

  2. I stored DB2 db2jcc4.jar  under $HOME/Java, but you can choose a different location.
  3. Click Drivers tab and then double click “IBM DB2 App Driver” to modify it.
  4. Highlight “Extra Class Path” tab and click “Add” to add the db2jcc4.jar you have earlier stored to you computer.
  5. Set “Example URL” to jdbc:db2://<HOST>:<PORT>/<DATABASE_NAME>
  6. Set “Class Name” to com.ibm.db2.jcc.DB2Driver

Setup connection to DB2 database

  1. To set up your first DB2 database connection on SQuirreL SQL Client, select the “Aliases” tab and click  icon, to add new database connection.
  2. From “Driver pull down list select “IBM DB2 App Driver”.
  3. Choose “Name” for you connection ie. the database name you are connecting to.
  4. URL is the form you set up when creating the driver: “jdbc:db2://<HOST>:<PORT>/<DATABASE_NAME>”. Set “host” and “dbname” accordingly.

No you can test your connection buy hitting test and then connect:

Ready to go

Once connection is done you can connect to DB2 database:

And start querying:

Questions?

If you have any questions or feedback, please connect with me.

2 thoughts on “Configure SQuirreL SQL Client for DB2 for Linux, UNIX, and Windows

    1. I haven’t tried on Windows, but the driver configuration are identical. Only difference is directory structure.

Leave a Reply