oracle 11gR2 如何修改vip
因为业务需要,需要将p570a主机和p570b主机上的vip做修改
修改前ip
192.168.128.12 p570a-vip
192.168.128.13 p570b-vip
修改后ip
10.76.31.113 p570a-vip
10.76.31.115 p570b-vip
两个节点的/etc/hosts 文件要修改为修改后的vip
以下为具体步骤:
1.关闭database
root用户下运行以下命令
cd /grid/app/11.2.0/grid/bin
./srvctl stop database -d gddb -o immediate
2.用srvctl config vip 检查vip设置
$ srvctl config vip -n p570a
VIP exists.:p570a
VIP exists.: /p570a-vip/192.168.128.12/255.255.255.0/eth0
$ srvctl config vip -n p570b
VIP exists.:p570b
VIP exists.: /p570b-vip/192.168.128.13/255.255.255.0/eth0
3.停止vip 服务和修改vip
./srvctl stop listener -n p570a
./srvctl stop listener -n p570b
./srvctl stop vip -n p570a
./srvctl stop vip -n p570b
./srvctl modify nodeapps -n p570a -A 10.76.31.113/255.255.255.0/en0
./srvctl modify nodeapps -n p570b -A 10.76.31.115/255.255.255.0/en0
4.确认是否修改成功
./srvctl config vip -n p570a
VIP exists.:p570a
VIP exists.:/p570a-vip/10.76.31.113/255.255.255.0/en0
./srvctl config vip -n p570b
VIP exists.:p570b
VIP exists.:/p570b-vip/10.76.31.115/255.255.255.0/en0
5.启动vip服务,监听,数据库
./srvctl start vip -n p570a
./srvctl start vip -n p570b
./srvctl start listener -n p570a
./srvctl start listener -n p570b
./srvctl start database –d gddb
修改成功