Oracle 12C ORA-01017/ORA-28040问题总结「建议收藏」
大家好,又见面了,我是你们的朋友全栈君。
在搭建12.2.0版本双节点RAC项目环境以后,测试链接其他客户端连接时出现了登陆的问题,客户端版本10.2.0.1 链接报错如下:
[root@12c bin]# 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.
[root@12c bin]# sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 8月 23 08:49:44 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
请输入用户名: system@cdb
输入口令:
ERROR:
ORA-28040: 没有匹配的验证协议
按照官方说法在服务端sqlnet.ora下需要添加如下参数,由于客户还有9i的客户端需要连接,这两个参数设置为了9
SQLNET.ALLOWED_LOGON_VERSION_SERVER=9
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=9
注意:参数和等号之间不要有空格,否则有可能参数不生效。
第一个问题,RAC环境下listener用的是grid ,那么此时是不是应该在grid的ORACLE_HOME下修改sqlnet还是在oracle 的ORACLE_HOME下修改?
答案是在oracle 的ORACLE_HOME下修改sqlnet.ora 。如果是新安装的RAC,默认sqlnet.ora文件 是不存在的自己创建一个即可。
修改完毕后不需要重启监听或者数据库。重新登陆,此时出现如下错误。
[root@12c bin]# sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 8月 23 08:57:46 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
请输入用户名: system@cdb
输入口令:
ERROR:
ORA-28040: 没有匹配的验证协议
请输入用户名: system@cdb
输入口令:
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
请输入用户名: system/oracle@cdb
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
在原来主机上测试登陆结果如下,可以确认密码没有问题。
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter user system identified by oracle;
用户已更改。
SQL> exit
从 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 断开
[oracle@12cr2 admin]$ vim sqlnet.ora
[oracle@12cr2 admin]$ sqlplus system/oracle
SQL*Plus: Release 12.2.0.1.0 Production on 星期三 8月 23 09:00:32 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
上次成功登录时间: 星期三 8月 23 2017 08:56:50 +08:00
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
这个问题开始也是百思不得解,但是偶然发现新建的用户可以正常登陆
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter session set container=pdb1;
会话已更改。
SQL> create user t1 identified by t1 ;
用户已创建。
SQL> grant connect,resource to t1;
授权成功。
在10.2.0.1客户端登陆,system显示用户名口令无效,但是使用新建的t1可以正常登陆。
[root@12c bin]# sqlplus system/oracle@pdb1
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 8月 23 09:33:55 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
请输入用户名: t1/t1@pdb1
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
那么问题应该出在密码上,此时修改一遍密码还是用的原密码。
SQL> alter user system identified by oracle;
alter user system identified by oracle
*
第 1 行出现错误:
ORA-65066: 指定更改必须应用于所有容器
SQL> alter session set container=cdb$root;
会话已更改。
SQL> alter user system identified by oracle;
用户已更改。
在10g客户端登陆,此时登陆正常。
[root@12c bin]# sqlplus system/oracle@pdb1
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 8月 23 09:39:20 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
结果总结如下:
应该是oracle密码版本写入的时候使用的时11g和12c配置的规则,导致正确密码也无法通过验证。
在sqlnet.ora文件新增了SQLNET.ALLOWED_LOGON_VERSION_SERVER=n,SQLNET.ALLOWED_LOGON_VERSION_CLIENT=n后密码虽然支持n以上版本,但是此时由于密码规则事先写入,导致低版本客户端无法识别。
此时只需要alter user_name identified by passwd ;修改一遍即可了。官方明确说了不支持10g以下客户端,虽然是个BUG,但是保险起见还是把低版本客户端升级比较好。
Client Version | Server Version | ||||||
---|---|---|---|---|---|---|---|
12.2.0#10 | 12.1.0 | 11.2.0 | 11.1.0 | 10.2.0 | 10.1.0 | 9.2.0 | |
12.2.0 | Yes | Yes | Yes | No | No | No#3 | No#3 |
12.1.0 | Yes | Yes | Yes | Was | MDS #7 | No#3 | No#3 |
11.2.0 | Yes#9 | Yes | Yes | Was | MDS #7 | No | Was #5 |
11.1.0 | No | Was | Was | Was | Was #7 | Was #6 | Was #5 |
10.2.0 | No | MDS #7 | MDS #7 | Was #7 | MDS | Was | Was #5 |
10.1.0#4 | No | No | Was #6 | Was #6 | Was | Was | Was |
9.2.0 | No | No#8 | Was #5 | Was #5 | Was #5 | Was | Was |
Key:
Yes Supported ES Supported but fixes only possible for customers with Extended Support . LES or MDS Supported but fixes only possible for customer with a valid Limited Extended Support or Market-Driven Support contract respectively. Was Was a supported combination but one of the releases is no longer covered by any of Premier Support, Primary Error Correct support, Extended Support, nor Extended Maintenance Support. Fixes are no longer possible. No Has never been Supported
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/138422.html原文链接:https://javaforall.cn
相关文章
- ORA-28281: Global application context is not updated on one or more Oracle RAC instances ORACLE 报错 故障修复 远程处理
- ORA-38731: Expected version string does not match string in log header. ORACLE 报错 故障修复 远程处理
- ORA-42030: cannot online redefine table “string”.”string” with commit SCN-based MV log ORACLE 报错 故障修复 远程处理
- ORA-42288: may not create a schema synonym for the specified schema ORACLE 报错 故障修复 远程处理
- ORA-44813: Action name is too large ORACLE 报错 故障修复 远程处理
- ORA-16671: instance-specific property must be set uniquely for instances of an Oracle RAC database ORACLE 报错 故障修复 远程处理
- Oracle 运维工程师的精彩职业生涯(oracle运维工程师)
- 解决Oracle 实例查询问题的方法(查询oracle实例)
- 技术Oracle推动大数据技术进步(oracle更新大数据)
- 「Oracle重建数据字典,教你轻松修复数据库问题!」(oracle重建数据字典)
- Oracle连接中文编码的问题及解决方法(oracle连接编码)
- 解决Oracle表中列重复问题(oracle列重复)
- 如何解决Oracle占用CPU高问题?(oracle占用cpu高)
- Oracle技巧:学会向下取整,避免数据精度丢失的问题(oracle向下取整)
- 实现Oracle数据库内容自动排序(oracle 内容排序)
- 深入分析Oracle 内存泄露问题(oracle 内存泄露)
- Oracle全文索引解决方案洞悉全文寻引真义(oracle全文索引问题)
- 解决C语言连接Oracle超时问题(c 连接oracle超时)
- 深入浅出Oracle Dual表(dual在oracle)
- Oracle数据库比DB2强大多步(oracle优于db2)
- Oracle 数据库 1对多关系查询策略实践(oracle 1对多查询)
- Oracle 12557解决数据库问题的利器(oracle 12557)
- Oracle 0 壮丽开端探索第一个 Oracle 数据库版本的悠久历史(oracle 0.)