由于数据库一个节点的硬盘损坏导致节点的oracle软件安装目录丢失,重新添加节点后需要手动注册监听,注册监听过程中出现异常。
$ crs_register ora.zcgl2.LISTENER_ZCGL2.lsnr
CRS-0181: Cannot access the resource profile '/oracle/app/product/crs/crs/public/ora.zcgl2.LISTENER_ZCGL2.lsnr.cap'.
提示说找不到/oracle/app/product/crs/crs/public/ora.zcgl2.LISTENER_ZCGL2.lsnr.cap这个文件,到目录下面发现文件确实不存在。
$ cd /oracle/app/product/crs/crs/public/
$ ls -l
total 8
-rwxr-x--- 1 oracle dba 3396 Aug 3 2004 action_scr.scr
解决方法:
从另外一个好的节点创建一个文件然后拷贝到本地进行修改
$ crs_stat -p ora.zcgl1.LISTENER_ZCGL1.lsnr> /oracle/app/ora.zcgl1.LISTENER_ZCGL1.lsnr.cap
将文件拷贝到另外一个节点
scp ora.zcgl1.LISTENER_ZCGL1.lsnr.cap zcgl2:/oracle/app/product/crs/crs/public/ora.zcgl2.LISTENER_ZCGL2.lsnr.cap
将里面的信息进行修改(共有三处)
NAME=ora.zcgl2.LISTENER_ZCGL2.lsnr
HOSTING_MEMBERS=zcgl2
REQUIRED_RESOURCES=ora.zcgl2.vip
修改后保存进行下面的操作
$ crs_profile -create ora.zcgl2.LISTENER_ZCGL2.lsnr -l /oracle/app/product/crs/crs/public/ora.zcgl2.LISTENER_ZCGL2.lsnr.cap -q
$ crs_register ora.zcgl2.LISTENER_ZCGL2.lsnr
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.zcgl.db application ONLINE ONLINE zcgl1
ora....l1.inst application ONLINE ONLINE zcgl1
ora....l2.inst application ONLINE ONLINE zcgl2
ora....lora.cs application ONLINE ONLINE zcgl1
ora....gl1.srv application ONLINE ONLINE zcgl1
ora....L1.lsnr application ONLINE ONLINE zcgl1
ora.zcgl1.gsd application ONLINE ONLINE zcgl1
ora.zcgl1.ons application ONLINE ONLINE zcgl1
ora.zcgl1.vip application ONLINE ONLINE zcgl1
ora....L2.lsnr application OFFLINE OFFLINE
ora.zcgl2.gsd application ONLINE ONLINE zcgl2
ora.zcgl2.ons application ONLINE ONLINE zcgl2
ora.zcgl2.vip application ONLINE ONLINE zcgl2
可以看到ora.zcgl2.LISTENER_ZCGL2.lsnr已经被注册
尝试启动
$ crs_stop ora.zcgl2.vip
Attempting to stop `ora.zcgl2.vip` on member `zcgl2`
Stop of `ora.zcgl2.vip` on member `zcgl2` succeeded.
$ crs_start ora.zcgl2.LISTENER_ZCGL2.lsnr
Attempting to start `ora.zcgl2.vip` on member `zcgl2`
Start of `ora.zcgl2.vip` on member `zcgl2` succeeded.
Attempting to start `ora.zcgl2.LISTENER_ZCGL2.lsnr` on member `zcgl2`
Start of `ora.zcgl2.LISTENER_ZCGL2.lsnr` on member `zcgl2` succeeded.
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.zcgl.db application ONLINE ONLINE zcgl1
ora....l1.inst application ONLINE ONLINE zcgl1
ora....l2.inst application ONLINE ONLINE zcgl2
ora....lora.cs application ONLINE ONLINE zcgl1
ora....gl1.srv application ONLINE ONLINE zcgl1
ora....L1.lsnr application ONLINE ONLINE zcgl1
ora.zcgl1.gsd application ONLINE ONLINE zcgl1
ora.zcgl1.ons application ONLINE ONLINE zcgl1
ora.zcgl1.vip application ONLINE ONLINE zcgl1
ora....L2.lsnr application ONLINE ONLINE zcgl2
ora.zcgl2.gsd application ONLINE ONLINE zcgl2
ora.zcgl2.ons application ONLINE ONLINE zcgl2
ora.zcgl2.vip application ONLINE ONLINE zcgl2
监听注册并启动成功
阅读(2124) | 评论(0) | 转发(0) |