上一篇简单介绍了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)))
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
Security ON: Local OS Authentication
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)))
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
Security ON: Local OS Authentication
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)))
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
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.