ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【RAC】lsnrctl 工具不适合管理监听

【RAC】lsnrctl 工具不适合管理监听

原创 Linux操作系统 作者:杨奇龙 时间:2011-12-04 22:19:08 0 删除 编辑
oracle 11gr2 不应使用lsnrctl管理LISTENER,而需使用srvctl或crsctl工具管理,否则lsnrctl将不会识别endpoints_listener.ora中的信息,造成监听没有在必要地址、端口上工作。
grid@rac1:/home/grid>cat /opt/11202/11.2.0/grid/network/admin/endpoints_listener.ora 
LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.250.7.225)(PORT=1521)(IP=FIRST))))         # line added by Agent
grid@rac1:/home/grid>cat /opt/11202/11.2.0/grid/network/admin/listener.ora           
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent

grid@rac1:/home/grid>
grid@rac1:/home/grid>lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 04-DEC-2011 22:15:09
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                03-DEC-2011 22:55:26
Uptime                    0 days 23 hr. 19 min. 42 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/11202/11.2.0/grid/network/admin/listener.ora
Listener Log File         /opt/rac/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.225)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.111)(PORT=1521)))
Services Summary...
Service "rac" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
Service "racXDB" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
The command completed successfully
grid@rac1:/home/grid>
grid@rac1:/home/grid>lsnrctl reload
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 04-DEC-2011 22:15:36
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
The command completed successfully
grid@rac1:/home/grid>lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 04-DEC-2011 22:15:38
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                03-DEC-2011 22:55:26
Uptime                    0 days 23 hr. 20 min. 12 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/11202/11.2.0/grid/network/admin/listener.ora
Listener Log File         /opt/rac/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
The listener supports no services
The command completed successfully
grid@rac1:/home/grid>
使用srvctl 工具重新启动监听
grid@rac1:/home/grid>srvctl stop listener
grid@rac1:/home/grid>srvctl status listener
监听程序 LISTENER 已启用
监听程序 LISTENER 未运行
grid@rac1:/home/grid>srvctl start listener 
grid@rac1:/home/grid>
grid@rac1:/home/grid>
grid@rac1:/home/grid>srvctl status listener
监听程序 LISTENER 已启用
监听程序 LISTENER 正在节点上运行: rac2,rac1
grid@rac1:/home/grid>
grid@rac1:/home/grid>
grid@rac1:/home/grid>lsnrctl status         
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 04-DEC-2011 22:16:52
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                04-DEC-2011 22:16:40
Uptime                    0 days 0 hr. 0 min. 11 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/11202/11.2.0/grid/network/admin/listener.ora
Listener Log File         /opt/rac/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.225)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.111)(PORT=1521)))
The listener supports no services
The command completed successfully

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22664653/viewspace-712696/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
MySQL DBA NoSQL DEVOPS

注册时间:2009-10-07

  • 博文量
    1026
  • 访问量
    7534916