基於同網段的RAC架構VIP修改

龍山游龍發表於2016-09-18
關閉相關叢集服務
[grid@s1-11g ~]$ srvctl stop scan
[grid@s1-11g ~]$ srvctl stop scan_listener
[grid@s1-11g ~]$ srvctl stop vip -i s1-11g-vip
[grid@s1-11g ~]$ srvctl stop vip -i s2-11g-vip
[grid@s1-11g ~]$ srvctl stop listener

在兩節點/etc/hosts下修改scan IP
#vi /etc/hosts
#192.168.200.90        scan
#192.168.200.93        s1-11g-vip
#192.168.200.94        s2-11g-vip
192.168.200.70          scan
192.168.200.73          s1-11g-vip
192.168.200.74          s2-11g-vip

[grid@s1-11g ~]$ which srvctl
/oracle/grid/crs_1/bin/srvctl
[grid@s1-11g ~]$ exit
logout
[root@s1-11g ~]# /oracle/grid/crs_1/bin/srvctl modify scan -n scan
[root@s1-11g ~]# /oracle/grid/crs_1/bin/srvctl modify nodeapps -n s1-11g -A 192.168.200.73/255.255.255.0/eth0
[root@s1-11g ~]# /oracle/grid/crs_1/bin/srvctl modify nodeapps -n s2-11g -A 192.168.200.74/255.255.255.0/eth0

[grid@s1-11g ~]$ srvctl start scan
[grid@s1-11g ~]$ srvctl start vip -i s1-11g
[grid@s1-11g ~]$ srvctl start vip -i s2-11g
[grid@s1-11g ~]$ srvctl start listener
[grid@s1-11g ~]$ srvctl start scan_listener

手動設定local_listener引數
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.73)(PORT=1521))' scope=both sid='hzmc1';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.74)(PORT=1521))' scope=both sid='hzmc2';

手動設定remote_listener引數
alter system set remote_listener='(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.70)(PORT=1521)))' scope=both sid='*';

在兩節點上測試用scan IP來進行資料庫連線
sqlplus system/oracle@192.168.200.70:1521/hzmc

在兩節點上測試用VIP來進行資料庫連線
sqlplus system/oracle@192.168.200.73:1521/hzmc
sqlplus system/oracle@192.168.200.74:1521/hzmc

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30310891/viewspace-2125078/,如需轉載,請註明出處,否則將追究法律責任。

相關文章