【RAC】lsnrctl 工具不適合管理監聽

楊奇龍發表於2011-12-04
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章