时间:2021-07-01 10:21:17 帮助过:37人阅读
Oracle 10g RAC监听报TNS-12545 TNS-12560 TNS-00515
昨日在客户现场一套RAC在启动监听的时候报TNS-12545 TNS-12560 TNS-00515错误,经过处理后恢复正常,,
今天在自己的虚拟机上还原了这个问题,记录下:
OS:Linux
DB:10.2.0.4 RAC
一、模拟恢复到事故发生时的情况
1、手工关闭监听后切换VIP
[Oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$ srvctl stop listener -n orlrac1
[oracle@orlrac1 ~]$ srvctl stop listener -n orlrac2
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcldb.db application ONLINE ONLINE orlrac1
ora....b1.inst application ONLINE ONLINE orlrac1
ora....b2.inst application ONLINE ONLINE orlrac2
ora....SM1.asm application ONLINE ONLINE orlrac1
ora....C1.lsnr application OFFLINE OFFLINE
ora....ac1.gsd application ONLINE ONLINE orlrac1
ora....ac1.ons application ONLINE ONLINE orlrac1
ora....ac1.vip application ONLINE ONLINE orlrac1
ora....SM2.asm application ONLINE ONLINE orlrac2
ora....C2.lsnr application OFFLINE OFFLINE
ora....ac2.gsd application ONLINE ONLINE orlrac2
ora....ac2.ons application ONLINE ONLINE orlrac2
ora....ac2.vip application ONLINE ONLINE orlrac2
[oracle@orlrac1 ~]$
2、手工切换vip ------问题的关键,昨天的问题是两个节点的VIP不知道什么原因互换了
[oracle@orlrac1 ~]$ crs_relocate ora.orlrac1.vip -c orlrac2
Attempting to stop `ora.orlrac1.vip` on member `orlrac1`
Stop of `ora.orlrac1.vip` on member `orlrac1` succeeded.
Attempting to start `ora.orlrac1.vip` on member `orlrac2`
Start of `ora.orlrac1.vip` on member `orlrac2` succeeded.
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$ crs_relocate ora.orlrac2.vip -c orlrac1
Attempting to stop `ora.orlrac2.vip` on member `orlrac2`
Stop of `ora.orlrac2.vip` on member `orlrac2` succeeded.
Attempting to start `ora.orlrac2.vip` on member `orlrac1`
Start of `ora.orlrac2.vip` on member `orlrac1` succeeded.
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$
[oracle@orlrac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcldb.db application ONLINE ONLINE orlrac1
ora....b1.inst application ONLINE ONLINE orlrac1
ora....b2.inst application ONLINE ONLINE orlrac2
ora....SM1.asm application ONLINE ONLINE orlrac1
ora....C1.lsnr application OFFLINE OFFLINE
ora....ac1.gsd application ONLINE ONLINE orlrac1
ora....ac1.ons application ONLINE ONLINE orlrac1
ora....ac1.vip application ONLINE ONLINE orlrac2
ora....SM2.asm application ONLINE ONLINE orlrac2
ora....C2.lsnr application OFFLINE OFFLINE
ora....ac2.gsd application ONLINE ONLINE orlrac2
ora....ac2.ons application ONLINE ONLINE orlrac2
ora....ac2.vip application ONLINE ONLINE orlrac1
[oracle@orlrac1 ~]$
----查看IP是否已经切换
[root@orlrac1 ~]#
[root@orlrac1 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:9F:BD:A4
inet addr:192.168.100.111 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1485 errors:0 dropped:0 overruns:0 frame:0
TX packets:992 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:141378 (138.0 KiB) TX bytes:119168 (116.3 KiB)