问题背景
使用plsql9 连接Oracle 19c报错:
ORA-28040:没有匹配的验证协议
ORA-28040: No matching authentication protocol或ORA-03134: Connections to this server version are no longer supported错误
问题解决
方案一
升级instantclient的版本,比如使用:
instantclient-basic-windows.x64-19.3.0.0.0dbru;-- x64 64位客户端
instantclient-basic-nt-19.12.0.0.0dbru; -- x86 32位客户端
跟plsql developer没有关系的。注意:
1、plsql连接oracle数据库,是通过instance-client作为连接驱动的,跟plsql没关系;
2、instance-client对Microsoft Visual C++有依赖:
Instant Client 19.* 要求 Visual Studio 2015 - 2019 redistributable。
Instant Client 12.2 要求 Visual Studio 2013 redistributable。
Instant Client 12.1 要求 Visual Studio 2010 redistributable。
Instant Client 11.2 要求 Visual Studio 2005 redistributable。
3、plsql developer <-> instance-client <-> visual c++ 三者必须同时是32位或64位,不能混用。
方案二
步骤一:Oracle 19c Server端进行配置,$ORACLE_HOME/network/admin/sqlnet.ora 增加如下配置:
$ vi sqlnet.ora SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8 SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
步骤二:重建需要访问用户密码(使用旧密码即可、必须sqlplus登录修改)
$ sqlplus / as sysdba SQL> alter user 用户名 identified by 密码; SQL> select username,password_versions from dba_users where username = 'C##USER1' USERNAME PASSWORD_VERSIONS C##USER1 10G 11G 12C
通过plsql9再次登录成功~
扩展
方案二 >> 步骤一中,配置sqlnet.ora文件,其实如果只是解决plsql客户端连接Oracle服务器问题,只设置SQLNET.ALLOWED_LOGON_VERSION_SERVER=8即可。
SQLNET.ALLOWED_LOGON_VERSION_SERVER:连接到 Oracle 数据库实例时允许的最低身份验证协议。
SQLNET.ALLOWED_LOGON_VERSION_CLIENT: