How to connect to DB2 on the mainframe - z/Os

RazorSQL can connect to DB2 on z/Os via either JDBC or ODBC. ODBC connections are available on Windows machines only. Below is information on how to get connected to DB2 on z/Os using the DB2 JDBC driver.

RazorSQL ships with the IBM DB2 UDB JDBC Universal driver. This driver does support access to DB2 running on z/OS. However, to connect to DB2 z/OS, a special license file is needed. The license file is contained in the DB2 Connect software installation. Here is the name of the license file:


The information below outlines how to get connected to DB2 UDB for z/OS version 8 using the Universal Driver.

Once the license file is obtained, to connect to DB2 on z/OS, you can go to the Connections -> Add Connection Profile, select DB2 as the database type, JDBC as the connection type, and enter the paths to the db2jcc_license_cisuz.jar and the db2jcc.jar file that ships with RazorSQL in the driver location field. Those two paths should be separated by a semi-colon.

For a JDBC type 4 connection, the JDBC URL format would be the following:

jdbc:db2://<server hostname or IP address>:<DB2 UDB Instance port number>/

For example,


For a JDBC type 2 connection, (you would actually be connecting via DB2 Connect, so DB2 Connect needs to be installed and configured on your machine), the JDBC URL format would be the following:


For example,


The driver class for all of the above examples is the following:

For more information on connecting to DB2 version 8 via JDBC, please see the following: