【Oracle】静态监听导致的ORA-12523错误
今天配置完共享服务器模式之后发现登录过程中报错ORA-12523,排查错误之后发现是静态监听惹的祸。本机之上有两个监听,一个静态监
今天配置完共享服务器模式之后发现登录过程中报错ORA-12523,排查错误之后发现是静态监听惹的祸。
本机之上有两个监听,一个静态监听1521端口,一个动态监听1526端口。
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=jp)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
LSNR2=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=jp)(PORT=1526))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc1))))
trace_level_LSNR2=SUPPORT
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=PROD)
(Oracle_HOME=/u01/app/oracle/product/10.2.0/db_1)
(SID_NAME=PROD))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1)
(PROGRAM=extproc)))
出错时的tnsnames配置:
prod_s=
(description =
(address = (protocol = tcp)(host = jp)(port = 1521))
(connect_data =
(server = shared)
(service_name = PROD)
)
)
连接数据库时报错:
[oracle@jp admin]$ sqlplus sys/oracle@prod_s as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 8 10:43:54 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12523: TNS:listener could not find instance appropriate for the client
connection
检查之后发现prod_s连接串走的是静态监听,共享服务器模式需要将调度进程的信息注册到监听之中,当有连接连入时,监听会选择一个负载最低的调度进程。而静态监听没有调度进程的信息,,导致通过shared_server模式连接报错。
修改tnsnames
prod_s=
(description =
(address = (protocol = tcp)(host = jp)(port = 1526))
(connect_data =
(server = shared)
(service_name = PROD)
)
)
重新通过shared_server连接,成功:
[oracle@jp admin]$ sqlplus sys/oracle@prod_s as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 8 10:42:22 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SYS@prod_s>select server from v$session;
SERVER
---------
SHARED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
SERVER
---------
DEDICATED
DEDICATED
DEDICATED
DEDICATED
DEDICATED
16 rows selected.
推荐阅读
-
Oracle ora-12514监听程序当前无法识别连接描述中请求的错误
-
Oracle DBA之监听的静态注册与动态注册
-
Oracle备份时系统负载过高导致ORA-3136错误和AIX系统的3D32B80D错误
-
调整Oracle sga的大小导致 ORA-00851和ORA-00844错误
-
Oracle监听的动态注册和静态注册
-
Oracle中“无监听程序”和“协议适配器错误”的解决方法
-
配置静态监听解决ORA-12514错误的案例
-
【Oracle】静态监听导致的ORA-12523错误
-
【Oracle】静态监听导致的ORA-12523错误
-
Oracle ora-12514监听程序当前无法识别连接描述中请求的错误