检查RAC的状态,从状态信息可以看到scan_listener 运行在rac-1节点。
[grid@rac-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.LISTENER_RAC.lsnr
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ORADATA.dg
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ORC_VOTE.dg
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.asm
ONLINE ONLINE rac-1 Started
ONLINE ONLINE rac-2 Started
ora.gsd
OFFLINE OFFLINE rac-1
OFFLINE OFFLINE rac-2
ora.net1.network
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ons
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.registry.acfs
OFFLINE OFFLINE rac-1
ONLINE ONLINE rac-2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac-1
ora.cvu
1 ONLINE ONLINE rac-1
ora.oc4j
1 ONLINE ONLINE rac-1
ora.oratest.db
1 ONLINE ONLINE rac-2 Open
2 ONLINE ONLINE rac-1 Open
ora.rac-1.vip
1 ONLINE ONLINE rac-1
ora.rac-2.vip
1 ONLINE ONLINE rac-2
ora.scan1.vip
1 ONLINE ONLINE rac-1
[grid@rac-1 ~]$
进一步确认scan ip 和 scan listener 运行在那个节点
[grid@rac-1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac-1
[grid@rac-1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac-1
从信息看,scan ip 运行在rac-1 节点。下面手动将scan ip 切换到rac-2 节点
我们将使用srvctl relocate scan_listener命令,下面是这个命令的帮助文档
[grid@rac-1 ~]$ srvctl relocate scan_listener -help
Temporarily relocate SCAN listener from one node of the cluster to another.
Usage: srvctl relocate scan_listener -i [-n ]
-i Ordinal number of IP address
-n SCAN VIP node name
-h Print usage
[grid@rac-1 ~]$
执行该命令
[grid@rac-1 ~]$ srvctl relocate scan_listener -i 1 -n rac-2
检查scan ip 信息,发现scan ip 已经运行在rac-2节点了。
[grid@rac-1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac-2
[grid@rac-1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac-2
[grid@rac-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.LISTENER_RAC.lsnr
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ORADATA.dg
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ORC_VOTE.dg
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.asm
ONLINE ONLINE rac-1 Started
ONLINE ONLINE rac-2 Started
ora.gsd
OFFLINE OFFLINE rac-1
OFFLINE OFFLINE rac-2
ora.net1.network
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.ons
ONLINE ONLINE rac-1
ONLINE ONLINE rac-2
ora.registry.acfs
OFFLINE OFFLINE rac-1
ONLINE ONLINE rac-2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac-2
ora.cvu
1 ONLINE ONLINE rac-1
ora.oc4j
1 ONLINE ONLINE rac-1
ora.oratest.db
1 ONLINE ONLINE rac-2 Open
2 ONLINE ONLINE rac-1 Open
ora.rac-1.vip
1 ONLINE ONLINE rac-1
ora.rac-2.vip
1 ONLINE ONLINE rac-2
ora.scan1.vip
1 ONLINE ONLINE rac-2
[grid@rac-1 ~]$
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1069318/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11590946/viewspace-1069318/