监听的instance status blocked分析
2024-08-26 23:47:25
对于处于NOMOUNT状态的数据库,PMON还没有将服务注册到监听上,这个时候服务的状态是BLOCKED的,对于来自远程的任何连接
都会报ORA-12528错误。
如下:
都会报ORA-12528错误。
如下:
[oracle@dbtest ~]$ export ORACLE_SID=orcl
[oracle@dbtest ~]$ sqlplus / as sysdba
[oracle@dbtest ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Nov 15 14:39:52 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select status from v$instance;
STATUS
------------------------
STARTED
------------------------
STARTED
SQL> !
[oracle@dbtest ~]$ lsnrctl status
[oracle@dbtest ~]$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 15-NOV-2012 14:40:43
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 0 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 0 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\>sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 11月 15 14:36:35 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12528: TNS: 监听程序: 所有适用例程都无法建立新连接
ORA-12528: TNS: 监听程序: 所有适用例程都无法建立新连接
请输入用户名:
ERROR:
ORA-12560: TNS: 协议适配器错误
ERROR:
ORA-12560: TNS: 协议适配器错误
请输入用户名:
ERROR:
ORA-12560: TNS: 协议适配器错误
ERROR:
ORA-12560: TNS: 协议适配器错误
SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus
PMON只有在MOUNT状态下才能将服务注册到监听器上。
SQL> alter database mount;
Database altered.
SQL> select status from v$instance;
STATUS
------------------------
MOUNTED
------------------------
MOUNTED
SQL> !
[oracle@dbtest ~]$ lsnrctl status
[oracle@dbtest ~]$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 15-NOV-2012 14:47:05
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 6 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 6 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\>sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 11月 15 14:47:44 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
-------------------------------- ------------------------
orcl MOUNTED
-------------------------------- ------------------------
orcl MOUNTED
对于连接到NOMOUNT的数据库10G之前只能使用静态注册,10G之后除了使用静态注册之外,还有个更简单的方法。
如下所示:
SQL> startup force nomount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
如下所示:
SQL> startup force nomount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 1.0737E+10 bytes
Fixed Size 2101912 bytes
Variable Size 1.0586E+10 bytes
Database Buffers 134217728 bytes
Redo Buffers 14671872 bytes
SQL> select instance_name,status from v$instance;
Fixed Size 2101912 bytes
Variable Size 1.0586E+10 bytes
Database Buffers 134217728 bytes
Redo Buffers 14671872 bytes
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
-------------------------------- ------------------------
orcl STARTED
-------------------------------- ------------------------
orcl STARTED
[oracle@dbtest ~]$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 15-NOV-2012 14:55:24
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 15 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
STATUS of the LISTENER
------------------------
Alias LISTENER_dbtest
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 02-NOV-2012 20:40:07
Uptime 12 days 18 hr. 15 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/oracle/product/db10gr2/network/admin/listener.ora
Listener Log File /u01/oracle/product/db10gr2/network/log/listener_dbtest.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.76)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.77)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...
Service "PL***tProc" has 1 instance(s).
Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
TNS配置如下:
orcl=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.76)(PORT = 1521))
)
(CONNECT_DATA =
(service_name = orcl)
(SERVER = DEDICATED)
(UR=A)
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.76)(PORT = 1521))
)
(CONNECT_DATA =
(service_name = orcl)
(SERVER = DEDICATED)
(UR=A)
)
)
C:\>sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 11月 15 14:53:53 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
-------------------------------- ------------------------
orcl STARTED
-------------------------------- ------------------------
orcl STARTED
TNS配置中加入UR=A选项即可,即使服务状态是BLOCKED。
这对于连接到Auxilary instance的时候非常有用,否则你只能采用OS认证方式。
最新文章
- 数组和链表--Java学习笔记(一)
- CSS3系列之3D制作
- 自己关于cocoapods的使用的一些理解和总结
- Swift2.1 语法指南——自动引用计数
- codeforces gym-101078
- 20145220《Java程序设计》实验一实验报告
- Matlab实现单变量线性回归
- 社交APP经典死法18种,听野路子产品菜狗怎么说
- 【前端】用jQuery实现瀑布流效果
- 开源:Sagit.Framework For IOS 开发框架
- git 安装部署教程
- python入门学习:6.用户输入和while循环
- HTML5新特性[ Notifications ] 桌面消息
- MyBatis中的if写法
- Logstash Introduction
- 18 LVM逻辑卷管理
- java native方法与JNI实现
- 股票的历史市盈率查询PE
- WebFlux Spring Security配置
- 移动端开发--rem和像素如何使用!
热门文章
- 使用自连接、for xml path('')和stuff合并显示多行数据到一行中(转)
- jenkins 图文教程 下载 --》安装--》更改默认端口号,附自启动脚本
- Redis学习之路(000)- 目录
- NBUT [1475] Bachelor
- TOP字句加SQL变量的相关问题
- Android WebView中软键盘会遮挡输入框相关问题
- SharePoint 2013 Step by Step—— How to Upload Multiple Documents in Document Library
- Python 爬虫编码格式问题 gb2312转换utf8
- django -- 对行的更新只有在save调用后才会入库
- 关于python中__name__=='__main__'的解释