在集群环境中,Oracle通过CRS管理集群中的资源状况,如database、ASM、instance、listener、VIP等CRS资源也就是nodeapps,而这些资源信息都注册在CRS的共享区域OCR里。
我在实验的过程中由于误操作,多建立了一个监听LISTENER_RAC, 在用netca建立了这个监听以后,CRS就在节点信息里加入了这个listner的信息, 我用netca删除了监听,由于某些问题,这里不做就不描述这个问题了,导致监听已经在listener.ora上删除,但是crs的信息里还有。
[oracle@inth-rac01 ~]$ /opt/crs/product/10.2.0.1/crs_1/bin/crs_stat -t Name Type Target State Host
------------------------------------------------------------
ora....01.lsnr application OFFLINE OFFLINE
ora....c01.gsd application OFFLINE OFFLINE
ora....c01.ons application OFFLINE OFFLINE
ora....c01.vip application ONLINE ONLINE inth-rac01
ora....02.lsnr application OFFLINE OFFLINE
ora....c02.gsd application OFFLINE OFFLINE
ora....c02.ons application OFFLINE OFFLINE
ora....c02.vip application ONLINE ONLINE inth-rac02
怎样手工删除listnere我们这里需要讨论的。
在crs里提供一个crs_unregister的命令,通过这个命令,我们可以手工删除监听已经其他的nodeapp的注册信息。
用crs_stat先查出listener应用的名字
[oracle@inth-rac01 ~]$ /opt/crs/product/10.2.0.1/crs_1/bin/crs_stat
NAME=ora.inth-rac01.LISTENER_RAC_INTH-RAC01.lsnr
TYPE=application
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.inth-rac02.LISTENER_RAC_INTH-RAC02.lsnr
TYPE=application
TARGET=OFFLINE
STATE=OFFLINE
然后用crs_unregister注销掉
[oracle@inth-rac01 ~]$ /opt/crs/product/10.2.0.1/crs_1/bin/crs_unregister ora.inth-rac01.LISTENER_INTH-RAC01.lsnr
[oracle@inth-rac01 ~]$ /opt/crs/product/10.2.0.1/crs_1/bin/crs_unregister ora.inth-rac02.LISTENER_INTH-RAC02.lsnr
再来查看,已经没有listener的信息了。
[oracle@inth-rac01 ~]$ /opt/crs/product/10.2.0.1/crs_1/bin/crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....c01.gsd application OFFLINE OFFLINE
ora....c01.ons application OFFLINE OFFLINE
ora....c01.vip application ONLINE ONLINE inth-rac01
ora....c02.gsd application OFFLINE OFFLINE
ora....c02.ons application OFFLINE OFFLINE
ora....c02.vip application ONLINE ONLINE inth-rac02
搜索更多相关主题的帖子: CRS RAC Lsnr listener