记一次Oracle监听无法动态注册处理

在之前的文章中http://itspace.iteye.com/blog/1055532探讨过监听无法动态注册的问题,这一次又在不同的客户中碰到了相同的问题,遂记录之。
客户反映他的数据库无法动态注册监听,监听状态显示如下
[quote]$ lsnrctl status

LSNRCTL for HPUX: Version 10.2.0.3.0 - Production on 10-JUN-2011 16:38:16

Copyright (c) 1991, 2006, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.123.12.89)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for HPUX: Version 10.2.0.3.0 - Production
Start Date 10-JUN-2011 16:35:38
Uptime 0 days 0 hr. 2 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/product/10.2/network/admin/listener.ora
Listener Log File /oracle/app/product/10.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=130.123.12.89)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "wesrmirr" has 1 instance(s).
[color=red]Instance "wesrmirr", status UNKNOWN[/color], has 1 handler(s) for this service...
The command completed successfully[/quote]
可以看到监听端口为1521,而且local_listner参数为空,
[quote]SQL> show parameter local

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
[color=red]local_listener string[/color]
log_archive_local_first boolean TRUE[/quote]
在这种情况下,理论上pmon会将实例状态动态注册至监听中。
手动发起监听注册,也没有作用,监听状态依旧。
[quote]SQL> alter system register;

System altered.[/quote]

于是检查数据库检查日志,在启动日志出现无效地址字样
[quote]PMON started with pid=3, OS id=2521
Fri Jun 10 16:33:25 2011
[color=red]ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=unknown)(PORT=1521))'[/color]
PSP0 started with pid=2, OS id=2526[/quote]
进一步检查listener.ora文件和/etc/hosts文件
[quote]SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/product/10.2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = wesrmirr)
(ORACLE_HOME = /oracle/app/product/10.2)
(SID_NAME = wesrmirr)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)([color=red]HOST = 130.123.12.89[/color])(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)[/quote]
可以看到ip地址130.123.12.89并没有出现在/etc/hosts配置文件中
[quote]$ more /etc/hosts
# @(#)B11.23_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
# <internet address> <official hostname> <aliases>
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#
127.0.0.1 localhost loopback
130.123.12.2 wesr-S-YWMIRROR[/quote]

找到原因之后,解决方法也变得很简单,只要将130.123.12.89添加至/etc/hosts,再执行手动注册监听即可。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值