sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决

2023-06-20,,

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决

sqlplus 连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0

问题描述:

使用sqlplus客户端登录数据库,报错SP2-0642,而使用其它方式plsql或者tnsnames等方式连接数据库均没有问题

[plain]

[oracle@test2 ~]$ sqlplus adt/passwd@192.168.112.235:1521/srv_test1

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 9 16:04:39 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

<span style="color:#FF6666">SP2-0642: SQL*Plus internal error state 2130, context 0:0:0</span>

Unsafe to proceed

Enter user-name:

原因:

The cause of this problem has been identified and verified in an unpublished Bug 6135152. ORA-25406 With Server Side TAF, And //HOST:PORT/SERVICE_NAME Connect String.

使用TAF连接并用EZCONNECT连接数据库时,触发了数据库相关bug

解决方法

方法1

1,去掉默认的端口号1521,可以解决

C:\Users\wj>sqlplus adt/passwd@192.168.112.235/srv_test1

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 10月 9 16:09:00 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management,

OLAP,

Data Mining and Real Application Testing options

SQL>

方法2,修改service的配置为默认选项

原有service创建方式

srvctl add service -d ms4adb -s srv_4a2 -r ms4adb -a ms4adb -P basic -e select -m basic -z 180 -w 5

现有service方式,使用默认参数配置,即可正常连接

srvctl add service -d ms4adb -s srv_4a2 -r ms4adb -a ms4ad

方法3,客户端sqlplus升级oracle 11.2,也可解决相关问题

Bug is fixed from release 11.2 onwards.

Check for one off patches for your release / platform via Patch 6135152

原文地址:https://www.2cto.com/database/201310/248704.html

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决的相关教程结束。

《sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决.doc》

下载本文的Word格式文档,以方便收藏与打印。