Oracle 12C ORA-01017/ORA-28040问题总结「建议收藏」

Oracle 12C ORA-01017/ORA-28040问题总结「建议收藏」在搭建12.2.0版本双节点RAC项目环境以后,测试链接其他客户端连接时出现了登陆的问题,客户端版本10.2.0.1链接报错如下:[root@12cbin]#oerrora2804028040,0000,"Nomatchingauthenticationprotocol"//*Cause:Noacceptibleauthenticationprotocol…

大家好,又见面了,我是你们的朋友全栈君。

在搭建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.net/138422.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • log4cpp深度封装[通俗易懂]

    log4cpp深度封装[通俗易懂]简介关于log4cpp的介绍与好处就不再赘言了,百度一搜一大把。主要是对于log4cpp的使用如果不封装一下,感觉还是挺麻烦的,例如不少函数名挺长的。所以自己动手把它的日常使用进行了封装,可以让使用log4cpp就像调用一句printf()函数一样简单快捷。封装目标不需要用一次就调用一次getInstance,只需要在main文件中引入一次即可封装成需要使用时只需简短的一举logError(“s

    2022年7月13日
    11
  • SQL语句distinct的多个字段去重问题

    SQL语句distinct的多个字段去重问题经典例子selectdistinctname,idfromtable或者selectname,idfromtablegroupbyname像这样是错误的写法,distinct不起作用的曲线救国写法:selectname,idfromtablewhereidin(selectmin(id)fromtablegrou……

    2022年10月22日
    0
  • mysql联合索引的使用规则

    mysql联合索引的使用规则从一道有趣的题目开始分析:假设某个表有一个联合索引(c1,c2,c3,c4)以下选项哪些字段使用了该索引:Awherec1=xandc2=xandc4>xandc3=xBwherec1=xandc2=xandc4=xorderbyc3Cwherec1=xandc4=xgroupbyc3,c2Dwherec1=?andc5

    2022年6月4日
    51
  • offset宏定义_vba left函数

    offset宏定义_vba left函数最近做某项目撸代码时用到了offsetof宏,第一次使用这个宏,项目结束后对其用法也略知一二,现分享如下。位于stddef.h中的offsetof()宏,是获得struct中某成员相对于struct首地址的偏移量,以byte为单位,用struct首地址加该偏移量获得该成员的实际地址时,要把struct首地址强制转换成以byte为计数单位,地址本身一般都是32位(与芯片架构有关),强制转换的计数单位…

    2022年8月22日
    5
  • 磁力链接文件服务器,什么是磁力链接(BT、磁力链这些词语是什么意思?)

    磁力链接文件服务器,什么是磁力链接(BT、磁力链这些词语是什么意思?)“知其然知其所以然”。我们经常在下载资料的时候能看到BT、磁力链等词语,百思特网这些词语到底是什么意思呢?下载都会用,但是你了解吗?BT下载传统的下载模式是每个客户端从服务器拷贝文件,跟校园内常用的FTP一样。因为服务器宽带是一定的,所以下载的人越多下载速度会越慢。而现在使用的下载器情况正好相反,使用的人越多文件下载速度越快。这是因为现在的下载器普遍采用类似BT的下载方式。布拉姆科恩发明了BT协议…

    2022年8月10日
    5
  • 美化包软件_html简单进度条插件

    美化包软件_html简单进度条插件前言在我们进行自动化测试的时候,用例往往是成百上千,执行的时间是几十分钟或者是小时级别。有时,我们在调试那么多用例的时候,不知道执行到什么程度了,而pytest-sugar插件能很好解决我们的痛点。

    2022年7月30日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号