ORACLE10g修改RAC VIP

ORACLE10g修改RAC VIP


1.确认当前

VIP
[oracle@rac1 ~]$ srvctl config nodeapps -n rac1 -a
VIP exists.: /rac1-vip.localdomain/10.182.15.101/255.255.255.0/eth0
[oracle@rac1 ~]$ srvctl config nodeapps -n rac2 -a
VIP exists.: /rac2-vip.localdomain/10.182.15.102/255.255.255.0/eth0

2.停止数据库
[oracle@rac1 ~]$ srvctl stop database -d rac
也可以一个实例一个实例停止
srvctl stop instance -d rac -i rac1

3.停止ASM
[oracle@rac1 ~]$ srvctl stop asm -n rac1
[oracle@rac1 ~]$ srvctl stop asm -n rac2

4.停止nodeapps
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac1
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac2
5.通过ifconfig–a确认VIP不在运行,也可以通过crs_stat来确定所服务已关闭


6.修改两节结点的/etc/hosts
[root@rac2 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain  localhost
#public
10.182.15.77    rac1.localdomain       rac1
10.182.15.99   rac2.localdomain        rac2
#private
10.182.15.78    rac1-priv.localdomain   rac1-priv
10.182.15.76    rac2-priv.localdomain   rac2-priv
#virtual
10.182.15.91    rac1-vip.localdomain    rac1-vip
10.182.15.92    rac2-vip.localdomain    rac2-vip

7.使用srvctl修改VIP
[root@rac1 bin]# ./srvctl modify nodeapps -n rac1 -A10.182.15.91/255.255.255.0/eth0
[root@rac1 bin]# ./srvctl modify nodeapps -n rac2 -A10.182.15.92/255.255.255.0/eth0

8.启动ASM
[oracle@rac1 bin]$ srvctl start asm -n rac1
[oracle@rac1 bin]$ srvctl start asm -n rac2

9.启动nodeapps
[oracle@rac1 admin]$ srvctl start nodeapps -n rac1
[oracle@rac1 admin]$ srvctl start nodeapps -n rac2

10.启动实例
[oracle@rac1 bin]$ srvctl start instance -d rac -i rac1
[oracle@rac1 bin]$ srvctl start instance -d rac -i rac2

11.若local_listener参数HOST使用IP,修改local_listener参数
在RAC1上执行下面语句
SQL> alter system setlocal_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=10.182.15.91)(PORT=1521))';
在RAC2上执行下面语句
SQL> alter system set

 local_listener='(ADDRESS = (PROTOCOL =TCP)(HOST=10.182.15.92)(PORT=1521))';

你可能感兴趣的:(rac-vip)