星期三, 1月 20, 2016

FW: Relocating SCAN VIP from one node to another node

一般來說, 會有這樣的需求大概會發生在幾個scenario

1.instance 要調整參數, 所以要重啟

2.Oracle RAC的某個節點需要進行patch , 需要停下來instance

3.服務切換測試

 在做RAC節點切換測試的時候, 其實把單台資料庫的instance 給shutdown, 服務也不會因此受影響, client還是可以透過scan-ip 連到第二台節點。


如果要把scan listener Relocate到剩餘可用的節點, 要以grid使用者,

#趕scan_listener 1

srvctl relocate scan -i 1 -n rac1

#趕scan_listener 2
srvctl relocate scan -i 2 -n rac1
#趕scan_listener 3
srvctl relocate scan -i 3 -n rac1

scan listener 都趕到剩下的可用節點. 才不至於影響AP連線服務.

 

Ref:

https://lokeshaggarwal.wordpress.com/2012/12/28/relocating-scan-vip-from-one-node-to-another-node/

 

Relocating SCAN VIP from one node to another node


Here, I am giving you a demonstration of relocation SCAN from one node to another.
In the below section, we can see that 3 SCAN VIP are running .e 1 VIP is running on rac2 and 2 VIP are running on rac1.
[grid@rac2 bin]$ ./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac1

[grid@rac2 bin]$ ./srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac1
So, now lets see the syntax for relocating the scan.
[grid@rac2 bin]$ ./srvctl relocate scan -h
Temporarily relocate SCAN VIP from one node of the cluster to another.
Usage: srvctl relocate scan -i <ordinal_number> [-n <node_name>]
-i <scan_ordinal_number> Ordinal number of IP address
-n <node_name> SCAN VIP node name
-h Print usages
Now, lets try to relocate SCAN VIP 1 to rac1.
[grid@rac2 bin]$ ./srvctl relocate scan -i 1 -n rac1
So, as per the below section we can see that now all the scan listener are runing on rac1.Hence, we can also conclude that it is not necessare that SCAN listener has to be run on every node.It can run on all nodes or on partially some nodes.
[grid@rac2 bin]$ ./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac1
[grid@rac2 bin]$

[grid@rac2 bin]$ ./srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac1
[grid@rac2 bin]$

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...