ORA-28040: No matching authentication protocol 解决

来源:互联网 发布:成都php培训费用要多少 编辑:程序博客网 时间:2024/06/10 22:50

某客户现场项目组通过4a连接的数据库,oracle客户端版本为9或者10,版本过低过低,而生存库的版本为12c

故通过客户端连接时报错ORA-28040: No matching authentication protocol


使用oerr命令来查看,在Oracle 11g下:

[oracle@orcltest ~]$ oerr ora 28040

28040, 0000, "No matching authentication protocol"

// *Cause: No acceptible authentication protocol for both client and server

// *Action: Administrator should set SQLNET_ALLOWED_LOGON_VERSION parameter

// on both client and servers to values that matches the minimum

// version supported in the system.

[oracle@orcltest ~]$

12c下:

oracle@HQsPSL-PSCV-R02:/oracle/app/oracle> oerr ora 28040

28040, 0000, "No matching authentication protocol"

// *Cause: There was no acceptable authentication protocol for

// either client or server.

// *Action: The administrator should set the values of the

// SQLNET.ALLOWED_LOGON_VERSION_SERVER and

// SQLNET.ALLOWED_LOGON_VERSION_CLIENT parameters, on both the

// client and on the server, to values that match the minimum

// version software supported in the system.

// This error is also raised when the client is authenticating to

// a user account which was created without a verifier suitable for

// the client software version. In this situation, that account's

// password must be reset, in order for the required verifier to


对症下药,可以看到,该参数在11g和12c下的解决方案是不同的。


查询了一下参数SQLNET.ALLOWED_LOGON_VERSION,发现该参数在12c中以废弃

而是采用SQLNET.ALLOWED_LOGON_VERSION_CLIENT和SQLNET.ALLOWED_LOGON_VERSION_SERVER代替

值得注意在sqlnet.ora中增加SQLNET.ALLOWED_LOGON_VERSION_CLIENT和SERVER配置,不用重启数据库或者监听,也不用重启应用。


那么这两个参数分别代表什么意义呢,区别如下:

SQLNET.ALLOWED_LOGON_VERSION_SERVER:控制可以连接到12c数据库的客户端版本(client --->orace 12c db )

SQLNET.ALLOWED_LOGON_VERSION_CLIENT:控制12c数据库可以连到哪些版本的数据库(orace 12c db --->其它版本的oracle db),例如:控制通过DB LINK可连接到哪些版本的oracle库。


所以,该案例中主要起作用的是需要配置SQLNET.ALLOWED_LOGON_VERSION_SERVER。

特别需要注意:


(1)如果是RAC,因为RAC是使用grid的监听器,因此很多人以为是在“/u01/app/12.1.0/grid/network/admin/sqlnet.ora” 加“SQLNET.ALLOWED_LOGON_VERSION_SERVER=8”,其实这是错的,而是仍然在$ORACLE_HOME/network/admin/sqlnet.ora加“SQLNET.ALLOWED_LOGON_VERSION_SERVER=8”
注意是oracle用户下的sqlnet.ora修改,不是grid用户




阅读全文
0 0
原创粉丝点击