ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【Oracle】lsnrctl reload 命令操作

【Oracle】lsnrctl reload 命令操作

原创 Linux操作系统 作者:杨奇龙 时间:2011-09-13 20:31:24 0 删除 编辑
上一篇简单介绍了lsnrctl reload的原理!这篇文章实验一下给数据库增加静态监听,reload 监听并查看监听器的日志:
oracle@rac1:/opt/oracle/11.2.0/yangdb/network/admin>lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-SEP-2011 14:21:41
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                07-SEP-2011 10:29:51
Uptime                    6 days 3 hr. 51 min. 49 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/11.2.0/yangdb/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/patdb3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
The listener supports no services
The command completed successfully
编辑listener.ora 之后,reload 操作:
oracle@rac1:/opt/oracle/11.2.0/yangdb/network/admin>lsnrctl reload
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-SEP-2011 14:22:44
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1)(PORT=1521)))
The command completed successfully
再次查看:
oracle@rac1:/opt/oracle/11.2.0/yangdb/network/admin>lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-SEP-2011 14:23:07
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                07-SEP-2011 10:29:51
Uptime                    6 days 3 hr. 53 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/11.2.0/yangdb/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/patdb3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "yangdb" has 1 instance(s).
  Instance "yangdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

另一个窗口查看监听日志:
oracle@rac1:/home/oracle>tail -f  /opt/oracle/diag/tnslsnr/patdb3/listener/alert/log.xml
 type='UNKNOWN' level='16' host_id='rac1'
 host_addr='172.18.87.197'>
 13-SEP-2011 14:22:44 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=rac1)(USER=oracle))(COMMAND=reload)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040)) * reload * 0
 

 type='UNKNOWN' level='16' host_id='rac1'
 host_addr='172.18.87.197'>
 WARNING: Subscription for node down event still pending
 

 type='UNKNOWN' level='16' host_id='rac1'
 host_addr='172.18.87.197'>
 13-SEP-2011 14:23:07 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=rac1)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040)) * status * 0
 

PS:还做了一个对reload操作进行trace的跟踪文件,但是看不懂其天书般的内容,于是作罢!!!
对于 Subscription for node down event still pending
Oracle称在较大压力下,监听进程可能出现间歇性停止服务,此时Oracle会spaw出另外一个监听进程,进而导致两个监听进程互相影响的故障。
对于RAC 环境,一个是监听SCAN的,另外一个则是本地的。
grid@rac1:/opt/11202/11.2.0/grid/network/trace>ps -ef | grep tnsl | grep -v grep
grid     18527     1  0 Sep07 ?        00:00:32 /opt/11202/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
grid     31647     1  0 Sep08 ?        00:00:57 /opt/11202/11.2.0/grid/bin/tnslsnr LISTENER -inherit
下面是 oracle 官方的解释:
Listener Subscription for ONS Node Down Event Information
Listener will subscribe to the Oracle Notification Service (ONS) node down event on startup if ONS configuration file is available. This subscription enables the listener to remove the affected service when it receives node down event notification from ONS. The listener uses asynchronous subscription for the event notification. The following warning message will be recorded to listener log file on each STATUS command if the subscription has not completed; for example if the ONS daemon is not running on the host.
WARNING: Subscription for node down event still pending
Listener will not be able to receive the ONS event while subscription is pending. Other than that, no other listener functionality is affected.

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

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

注册时间:2009-10-07

  • 博文量
    1026
  • 访问量
    7698634