SQLNET.ALLOWED_LOGON_VERSION = 10  参数引起的ORA-28040故障一则:

环境:
Database:Oracle 11gR2 (11.2.0.3)
Applicate:tomcate+apache
connect type:jdbc6-11.2.0.1.jar

现象:
    用jdbc来连接我的Oracle 11gR2集群,报如下错误,而通过sqlplus,pl/sql,isqlplus,odbc等工具访问没有任何问题:

error:
ORA-28040: No matching authentication protocol



链接字符串写法:

xxx_driver=oracle.jdbc.driver.OracleDriver
xxx_dburl=jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST =(LOAD_BALANCE =yes)(ADDRESS = (PROTOCOL = TCP)(HOST = db.prudentwoo.com)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = TAF)(failover_mode=(type=select)(method=basic))))
xxx_dbuser=prudent
xxx_dbpwd=woo




oerr给出的解决办法:

Error:     ORA-28040 (ORA-28040)
Text:     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.




Metalink给出的解决办法:
1、这是JDBC的一个bug,应用JDBC Driver Patch (6779501)
2、或者尝试将 SQLNET.ALLOWED_LOGON_VERSION值改为9或8
3、

问题分析:
    该参数是用来设定数据库采取的方式所设定的一个参数,从错误信息来看"没有匹配的身份认证协议",后来我采取更换其它协议值,结果还是发生同样的问题,无法连接。

问题排错:
    这个时候我采用的是排他法来测试,基本上每个认证的协议数字都用了一遍,还是不行,所幸把这行参数给删了,JDBC就能链接上数据库了。


文档参考:
http://docs.oracle.com/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIEAFHAhttp://space.itpub.net/20674423/viewspace-776433/http://space.itpub.net/20674423/viewspace-776432/