关闭集群

关闭数据库及监听

srvctl stop database -d zrzxdb
srvctl stop listener
srvctl stop vip -node zrzxdb1
srvctl stop vip -node zrzxdb2
srvctl stop scan_listener
srvctl stop scan

修改IP

# oifcfg getif
# oifcfg delif -global bond0/10.126.143.0
# oifcfg setif -global bond0/10.192.4.0:public
# oifcfg getif

修改集群IP

修改IP地址,重新配置hosts、tnsnames,重新配置VIP

vim /etc/hosts
vim $ORACLE_HOME/network/admin/tnsnames.ora
cat /etc/hosts
cat $ORACLE_HOME/network/admin/tnsnames.ora
srvctl modify nodeapps -n zrzxdb1 -A 10.192.4.133/255.255.255.0/bond0
srvctl modify nodeapps -n zrzxdb2 -A 10.192.4.134/255.255.255.0/bond0
srvctl config nodeapps -a
srvctl start vip -n zrzxdb1
srvctl start vip -n zrzxdb2
srvctl start listener

修改SCAN

用root用户刷新scan vip

srvctl modify scan -n zrzxdbscan
srvctl config scan

起库

启动监听及数据库

srvctl start scan 
srvctl start scan_listener

srvctl start database -d zrzxdb
show parameter listener