<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; No matching authentication protocol</title>
	<atom:link href="https://www.xifenfei.com/tag/no-matching-authentication-protocol/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Tue, 17 Nov 2026 13:36:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>ORA-28040: No matching authentication protocol</title>
		<link>https://www.xifenfei.com/2016/07/ora-28040-no-matching-authentication-protocol.html</link>
		<comments>https://www.xifenfei.com/2016/07/ora-28040-no-matching-authentication-protocol.html#comments</comments>
		<pubDate>Tue, 19 Jul 2016 16:51:36 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORACLE 12C]]></category>
		<category><![CDATA[No matching authentication protocol]]></category>
		<category><![CDATA[ORA-28040]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=6469</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2016/07/ora-28040-no-matching-authentication-protocol.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2016/07/ora-28040-no-matching-authentication-protocol.html" target="_blank">ORA-28040: No matching authentication protocol</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>电脑上面安装了三个版本的数据库10.2.0.3,11.2.0.1,12.1.0.2版本,使用他们分别尝试连接另外一个12.2.0.3的环境数据库发现只有12.1的版本客户端可以连接到12.2上面，其他版本报ORA-28040错误<br />
<strong>分别测试连接，报ORA-28040错误</strong></p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XIFENFEI&gt;sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期三 7月 20 00:03:01 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production

SQL&gt;
SQL&gt;

C:\Users\XIFENFEI&gt;D:\app\FAL\product\11.2.0\dbhome_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 7月 20 00:10:33 2016

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-28040: No matching authentication protocol


C:\Users\XIFENFEI&gt;D:\app\product\10.2.0\db_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 7月 20 00:09:30 2016

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-28040: 没有匹配的验证协议


请输入用户名:
</pre>
<p><strong>ORA-28040错误说明</strong></p>
<pre class="brush: bash; title: ; notranslate">
28040, 0000, &quot;No matching authentication protocol&quot;
// *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
//          be generated and allow authentication to proceed successfully.
</pre>
<p><strong>解决方法</strong><br />
在服务端的sqlnet.ora文件中加入上如下信息，然后重启监听</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@ora1221 admin]$ vi sqlnet.ora

SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8

[oracle@ora1221 admin]$ lsnrctl stop

LSNRCTL for Linux: Version 12.2.0.0.3 - Production on 17-JUN-2016 06:36:13

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
[oracle@ora1221 admin]$ lsnrctl start

LSNRCTL for Linux: Version 12.2.0.0.3 - Production on 17-JUN-2016 06:36:17

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/12.2.0/db_2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.0.3 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/ora1221/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora1221)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.0.3 - Production
Start Date                17-JUN-2016 06:36:17
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora1221/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora1221)(PORT=1521)))
The listener supports no services
The command completed successfully
</pre>
<p><strong>sqlnet中参数说明</strong><br />
SQLNET.ALLOWED_LOGON_VERSION_SERVER  是服务端参数对于jdbc和oci都生效,该参数不是只具体数据库版本,而是指授权协议的版本<br />
SQLNET.ALLOWED_LOGON_VERSION_CLIENT  是指作为客户端连接其他实例的时候生效,也是只授权协议版本,而且该参数只对oci生效,jdbc 需要通过在代码中类似实现</p>
<pre class="brush: bash; title: ; notranslate">
OracleDataSource ods = new OracleDataSource();
ods.setURL(jdbcURL);
ods.setUser(&quot;scott&quot;);
ods.setPassword(&quot;tiger&quot;);
Properties props = new Properties();
props.put(&quot;oracle.jdbc.allowedLogonVersion&quot;, 12);
ods.setConnectionProperties(props);
Connection con = ods.getConnection();
</pre>
<p>上述两个参数可以填写值<br />
12a for Oracle Database 12c release 12.1.0.2 or later authentication protocols (strongest protection)<br />
12 for the critical patch updates CPUOct2012 and later Oracle Database 11g authentication protocols (recommended)<br />
11 for Oracle Database 11g authentication protocols (default)<br />
10 for Oracle Database 10g authentication protocols<br />
9 for Oracle9i Database authentication protocol<br />
8 for Oracle8i Database authentication protocol<br />
<img src="//www.xifenfei.com/wp-content/uploads/2016/07/allowed_logon_version_server.jpg" alt="allowed_logon_version_server" width="1276" height="681" class="alignleft size-full wp-image-6472" /><br />
<hr />
具体描述请见:http://docs.oracle.com/database/121/NETRF/sqlnet.htm#NETRF2010<br />
<br />
<strong>再次测试连接</strong></p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XIFENFEI&gt;D:\app\FAL\product\11.2.0\dbhome_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 7月 20 00:20:21 2016

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production

SQL&gt; exit
从 Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production 断开

C:\Users\XIFENFEI&gt;D:\app\product\10.2.0\db_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 7月 20 00:20:28 2016

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production

SQL&gt;

C:\Users\XIFENFEI&gt;sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期三 7月 20 00:20:55 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production
</pre>
<p>该问题在jdbc中也表现明显，建议参考Starting With Oracle JDBC Drivers (文档 ID 401934.1)和Client / Server Interoperability Support Matrix for Different Oracle Versions (文档 ID 207303.1)选择完全兼容性的客户端和jdbc版本,另外可以关注相关文章:<br />
ORA-28040 and SQLNET.ALLOWED_LOGON_VERSION_CLIENT for JDBC Thin Clients (文档 ID 2000339.1)<br />
ORA-28040 Using JDBC Connection to 12c Database (文档 ID 2111118.1)<br />
JDBC Version 10.2.0.4 Produces ORA-28040 Connecting To Oracle 12c (12.1.0.2) Database (文档 ID 2023160.1)<br />
ORA-28040 and SQLNET.ALLOWED_LOGON_VERSION_CLIENT for JDBC Thin Clients (文档 ID 2000339.1)</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%aeasm.html" rel="bookmark" class="crp_title">远程访问ASM</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/connect-pdb-sid-use_sid_as_service_listener.html" rel="bookmark" class="crp_title">使用sid方式直接访问pdb(USE_SID_AS_SERVICE_LISTENER)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/sqlnet-authentication_services%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e.html" rel="bookmark" class="crp_title">SQLNET.AUTHENTICATION_SERVICES参数说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e5%9c%a8rac%e4%b8%adlsnrctl%e5%92%8csrvctl%e6%93%8d%e4%bd%9c%e7%9b%91%e5%90%ac%e5%8c%ba%e5%88%ab.html" rel="bookmark" class="crp_title">在RAC中lsnrctl和srvctl操作监听区别</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/%e5%9b%a0ipc%e5%af%bc%e8%87%b4%e5%a4%9a%e4%b8%aa%e7%9b%91%e5%90%ac%e4%b8%8d%e8%83%bd%e6%ad%a3%e5%b8%b8%e5%90%af%e5%8a%a8.html" rel="bookmark" class="crp_title">因IPC导致多个监听不能正常启动</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/10/ora-01034-ora-27101.html" rel="bookmark" class="crp_title">ORA-01034 ORA-27101故障分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/hostname%e9%85%8d%e7%bd%ae%e4%b8%8d%e5%88%87%e5%bd%93%e5%af%bc%e8%87%b4tns-12542%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">hostname配置不切当导致TNS-12542错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/03/%e4%bf%ae%e6%94%b911-2-rac-%e7%9a%84-scan-ip.html" rel="bookmark" class="crp_title">修改11.2 RAC 的 SCAN IP</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/07/oracle-12c-em-express%e8%a1%a5%e5%85%85.html" rel="bookmark" class="crp_title">ORACLE 12C EM Express补充</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/ipfirst%e4%bd%9c%e7%94%a8%e8%af%b4%e6%98%8e.html" rel="bookmark" class="crp_title">IP=FIRST作用说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/oracle%e7%9b%91%e5%90%ac%e8%ae%be%e7%bd%ae%e5%af%86%e7%a0%81.html" rel="bookmark" class="crp_title">Oracle监听设置密码</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/enterprise-manager-database-express-12c-%e6%ac%a3%e8%b5%8f.html" rel="bookmark" class="crp_title">Enterprise Manager Database Express 12c 欣赏</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2016/07/ora-28040-no-matching-authentication-protocol.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
