database Oracle SQL 开发人员中的 DB2 数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10250557/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 08:31:28  来源:igfitidea点击:

DB2 database in Oracle SQL developer

databaseoracledb2mainframeoracle-sqldeveloper

提问by Frantumn

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.

我听说可以使用像 Oracle SQL developer 这样的客户端连接到大型机 DB2 数据库。我已经在线查看,似乎无法在 SQL 开发人员中找到执行此操作所需的连接器文件。任何人都可以将我指向一个链接来完成这项工作吗?或者告诉我我是否只是在寻找错误的东西。我已经在 Oracle 中使用 MySQL 数据库的连接器,所以我认为它与 DB2 数据库类似。

采纳答案by Fred Sobotka

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

连接到 DB2 的最简单方法是通过他们的 JDBC Type 4 JCC 驱动程序。此驱动程序使用两个 JAR:

  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
  1. db2jcc.jar,这是驱动程序
  2. db2jcc_license_cisuz.jar,它允许驱动程序连接到所有 DB2 服务器平台,包括 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.

您的大型机 DBA 应该能够为您提供这两个 JAR,并帮助您使用正确的 JDBC 驱动程序选项构建连接字符串。

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

可以在此处找到有关 JDBC 连接到 DB2 的更多信息:http: //publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apdv.java.doc/src/tpc/ imjcc_c0024189.html

回答by Sireesh Yarlagadda

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

要在 SQL Developer 中启用 DB2,您需要拉出 db2jcc.jar

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

进入“Oracle SQL Developer”-“工具”-“首选项”->第三方JDBC驱动

enter image description here

在此处输入图片说明

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

我的 ORACLE SQL Developer 版本是 4.1.1.19(它主要适用于许多版本)

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

将该 jar 添加到第三方 JDBC 驱动程序后。单击“新建连接”。

You should be able to find DB2 Option.

您应该能够找到 DB2 Option。

enter image description here

在此处输入图片说明