简体   繁体   English

ORA-28040:将数据库从 11g 升级到 12c 之后

[英]ORA-28040: After Upgrade Database to 12c from 11g

Problem Statement:问题陈述:

We are doing a migration activity in which we have migrated DATABASE from ORACLE 11g to ORACLE 12c .我们正在进行一项迁移活动,将 DATABASE 从ORACLE 11g迁移到ORACLE 12c After upgrade one of our application which is using jdk 6 with ojdbc6.jar (JDBC Driver) is not able to connect the 12c database.升级我们使用带有ojdbc6.jar (JDBC 驱动程序)的jdk 6应用程序之一后,无法连接 12c 数据库。

Below error we are getting :我们得到以下错误:

 java.sql.SQLException: ORA-28040: No matching authentication protocol

after Upgrade Database to 12c将数据库升级到 12c 后

Configuration配置

  • JDK Version : 1.6 JDK 版本:1.6
  • JDBC Driver : ojdbc6.jar JDBC 驱动程序: ojdbc6.jar
  • Database Version : Oracle 12c数据库版本:Oracle 12c
  • SQLNET.ALLOWED_LOGON_VERSION_SERVER = 11
  • SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 11

Workaround tried:尝试的解决方法:

  • 1) We tried to run a simple jdbc application with jdk1.6 and ojdbc6.jar it was successful. 1) 我们尝试用 jdk1.6 和 ojdbc6.jar 运行一个简单的 jdbc 应用程序,它成功了。 Also it is as per Oracle Compatibility matrix.它也符合 Oracle 兼容性矩阵。
  • 2) We asked to update the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 but security team cannot do it as it does not comply on security standards. 2) 我们要求更新参数SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8但安全团队不能这样做,因为它不符合安全标准。

Please suggest how we should proceed forward to fix this issue.请建议我们应该如何继续解决这个问题。

The problem was then weblogic.jar and from the classpath of weblogic.jar, ojdbc14.jar was being referred.然后问题出在 weblogic.jar 和 weblogic.jar 的类路径中,ojdbc14.jar 被引用。 We checked in WL_HOME\\server\\lib library and found that ojdbc14.jar was there.我们检查了WL_HOME\\server\\lib 库,发现有ojdbc14.jar。 We just let keep it there but copied ojdbc6.jar in some external directory and loaded same in CLASSPATH before all jars.我们只是让它保留在那里,但将 ojdbc6.jar 复制到某个外部目录中,并在所有 jars 之前在 CLASSPATH 中加载相同的内容。 Below is from oracle docs-以下来自oracle docs-

This driver is installed in the WL_HOME\\server\\lib folder (where WL_HOME is the folder where WebLogic Server is installed) with weblogic.jar.此驱动程序与 weblogic.jar 一起安装在 WL_HOME\\server\\lib 文件夹(其中 WL_HOME 是安装 WebLogic Server 的文件夹)中。 The manifest in weblogic.jar lists this file so that it is loaded when weblogic.jar is loaded (when the server starts). weblogic.jar 中的清单列出了这个文件,以便在加载 weblogic.jar 时(服务器启动时)加载它。 Therefore, you do not need to add this JDBC driver to your CLASSPATH.因此,您不需要将此 JDBC 驱动程序添加到您的 CLASSPATH。 If you plan to use a third-party JDBC driver that is not installed with WebLogic Server, you must install the drivers, which includes updating your CLASSPATH with the path to the driver files, and may include updating your PATH with the path to database client files.如果您计划使用未随 WebLogic Server 安装的第三方 JDBC 驱动程序,则必须安装驱动程序,其中包括使用驱动程序文件的路径更新 CLASSPATH,并且可能包括使用数据库客户端的路径更新 PATH文件。 See "Supported Database Configurations" on the Oracle Fusion Middleware Supported System Configurations page at http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlOpens a new window.请参阅 Oracle 融合中间件支持的系统配置页面上的“支持的数据库配置”, 网址http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlOpens a new window。

If you plan to use a different version of any of the drivers installed with WebLogic Server, you can replace the driver file in WL_HOME\\server\\lib with an updated version of the file or add the new file to the front of your CLASSPATH.如果计划使用随 WebLogic Server 安装的任何驱动程序的不同版本,则可以将 WL_HOME\\server\\lib 中的驱动程序文件替换为该文件的更新版本,或者将新文件添加到 CLASSPATH 的前面。

So if you are facing the same issue I would like to suggest-因此,如果您面临同样的问题,我想建议-
1) Check for the Oracle driver (ojdbc) - as the most post on StackOverflow suggest same. 1) 检查 Oracle 驱动程序 (ojdbc) - 正如 StackOverflow 上的大多数帖子所暗示的那样。 You can check ojdbc driver compatibity here您可以在此处检查 ojdbc 驱动程序兼容性
2) If you cannot change driver immediately the change below in sqlnet.ora 2)如果你不能立即更换驱动程序在sqlnet.ora下面的更改

SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8

(SQLNET.ALLOWED_LOGON_VERSION is depreciated in 12c. Also, please be noted that In 12c, the default value for the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter has been updated to “11”. This means that database clients using pre-11g JDBC thin drivers cannot authenticate to 12.1 database servers unless the parameter is set to the old default of “8”) For your reference, please check- (SQLNET.ALLOWED_LOGON_VERSION 在 12c 中已折旧。另外,请注意,在 12c 中,SQLNET.ALLOWED_LOGON_VERSION_SERVER 参数的默认值已更新为“11”。这意味着使用 11g 之前的 JDBC 瘦驱动程序的数据库客户端无法进行身份验证12.1 数据库服务器除非参数设置为旧的默认值“8”)供您参考,请检查-
https://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60010 https://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60010
https://docs.oracle.com/database/121/UPGRD/afterup.htm#UPGRD60157 https://docs.oracle.com/database/121/UPGRD/afterup.htm#UPGRD60157

Thanks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM