11g relocate scan ip(二)

2014-11-24 16:22:37 · 作者: · 浏览: 7
elvis112 ~]$ srvctl relocate -h The SRVCTL relocate command relocates a running Oracle Clusterware managed object to another node or instance. Usage: srvctl relocate database -d {[-n ] [-w ] | -a [-r]} [-v] Usage: srvctl relocate service -d -s {-i -t | -c -n } [-f] Usage: srvctl relocate server -n "" -g [-f] Usage: srvctl relocate vip -i [-n ] [-f] [-v] Usage: srvctl relocate scan -i [-n ] Usage: srvctl relocate scan_listener -i [-n ] Usage: srvctl relocate oc4j [-n ] [-v] Usage: srvctl relocate gns [-n ] [-v] Usage: srvctl relocate cvu [-n ] For detailed help on each command and object and its options use: srvctl -h [grid@elvis112 ~]$ srvctl relocate scan_listener -i elvis112 -n elvis111 PRKO-2111 : Invalid number elvis112 for command line option i -----注意,上述报错,-i为ordinal_number -n为节点的名字。官档描述如下: srvctl relocate scan_listener -i ordinal_number [-n node_name] Note:This command is only available with Oracle Clusterware. Option Description -i ordinal_number An ordinal number that identifies which SCAN VIP you want to relocate. The range of values you can specify for this option is 1 to 3. -n node_name The name of a single node. If you do not specify this option, then the utility chooses the node to which the SCAN VIP is relocated. Example An example of this command is: $ srvctl relocate scan_listener -i 1 -n node3 [grid@elvis112 ~]$ srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 [grid@elvis112 ~]$ srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node elvis112 [grid@elvis112 ~]$ srvctl relocate scan_listener -i 1 -n elvis111 [grid@elvis112 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora.DATA1.dg ora....up.type 0/5 0/ ONLINE ONLINE elvis111 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE elvis111 ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE elvis111 ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE elvis111 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE elvis112 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE elvis111 ora....11.lsnr application 0/5 0/0 ONLINE ONLINE elvis111 ora....111.gsd application 0/5 0/0 OFFLINE OFFLINE ora....111.ons application 0/3 0/0 ONLINE ONLINE elvis111 ora....111.vip ora....t1.type 0/0 0/0 ONLINE ONLINE elvis111 ora....SM1.asm application 0/5 0/0 ONLINE ONLINE elvis112 ora....12.lsnr application 0/5 0/0 ONLINE ONLINE elvis112 ora....112.gsd application 0/5 0/0 OFFLINE OFFLINE ora....112.ons application 0/3 0/0 ONLINE ONLINE elvis112 ora....112.vip ora....t1.type 0/0 0/0 ONLINE ONLINE elvis112 ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE ora....network ora....rk.type 0/5 0/ ONLINE ONLINE elvis111 ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE elvis112 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE elvis111 ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE elvis111 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE elvis111 ---------可以看到已经relocate到elvis111上了,达到了我想要的效果 [grid@elvis112 ~]$ srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node elvis111