-->

DB2 database in Oracle SQL developer

2020-05-25 07:39发布

问题:

I've heard it's possible to connect to a mainframe DB2 database with a client like Oracle SQL developer. I've looked on-line and can't seem to find the connector files needed to do this in SQL developer. Can anyone direct me to a link to make this work? Or tell me if im just looking for the wrong thing to begin with. I've got the connector working with MySQL databases in Oracle, so I assumed it would be similar for a DB2 database.

回答1:

The easiest way to connect to DB2 is through their JDBC Type 4 JCC driver. This driver uses two JARs:

  1. db2jcc.jar, which is the driver
  2. db2jcc_license_cisuz.jar, which permits the driver to connect to all DB2 server platforms, including z/OS

Your mainframe DBA should be able to provide you with both of these JARs, and assist you in building a connect string with the proper JDBC driver options.

More information about JDBC connectivity to DB2 can be found here: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_c0024189.html



回答2:

To enable DB2 in SQL Developer, you need to pull out the db2jcc.jar

Go to "Oracle SQL Developer" - "Tools" - "Preferences" - > Third Party JDBC Driver

My ORACLE SQL Developer Version is 4.1.1.19 (it mostly works for many versions)

After adding that jar to third party JDBC Drivers. Click on "New Connection".

You should be able to find DB2 Option.