Oracle 11GR2 11.2.0.4 RAC 私有IP修改及创建多控制文件

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:2101

11GR2 RAC 私有IP修改
prepare工作
$GRID_HOME/bin/crsctl stat res -t
$GRID_HOME/bin/crsctl stat res -p
$GRID_HOME/bin/crsctl query css votedisk
$GRID_HOME/bin/ocrcheck
$GRID_HOME/bin/oifcfg getif
$GRID_HOME/bin/srvctl config nodeapps -a
$GRID_HOME/bin/srvctl config scan
$GRID_HOME/bin/srvctl config asm -a
$GRID_HOME/bin/srvctl config listener -l -a
$DB_HOME/bin/srvctl config database -d wmsprd -a
$DB_HOME/bin/srvctl config service -d wmsprd -s wmsprd -v
SQL> SET lines 200
SQL> col host_name FOR a15
SQL> col INSTANCE_NAME FOR a15
SQL> SELECT a.host_name, a.instance_name, b.name, b.ip_address
2 FROM gv$cluster_interconnects b, gv$instance a
3 WHERE a.inst_id=b.inst_id
4 ORDER BY 1,2,3;

HOST_NAME INSTANCE_NAME NAME IP_ADDRESS
--------------- --------------- --------------------------------------------- ------------------------------------------------
wms1 +ASM1 en0 169.254.189.151
wms2 +ASM2 en0 169.254.23.59

SQL>

1 修改 private ip
1.1 确保crs集群是打开的
可以用olsnodes –s 检查集群的状态
$ olsnodes -s
wms1 Active
wms2 Active
$
1.2 检查GPN profile,并做备份
$ gpnptool get
Warning: some command line parameters were defaulted. Resulting command line:
gpnptool.bin get -o-

Zqk8e9slXSELBvA5gEI45/CYS2g=Id7lBRgrO13NyJEwT86YOV/LAVp0xwH/kiQDzH3Pe1h+JSGmE9U7mH67uFUZ+ydCpDORRFvEjZm7883hcYHuBD/Fsv9DqDMXIoMr+Yx+YCIN8WpA5AVY/GZjznJdKDFJvgjnNSvqFt3vtvaALt73GVAlAid91FjFzzIdZ4QVL8k=
Success.
$ pwd
/u01/app/oracle/grid/asm/gpnp/wms1/profiles/peer
$ cp profile_orig.xml profile_orig.xml.20150120
$ cp profile.xml profile.xml.20150120

1.2 用oifcfg getif 检查和oifcfg setif修改当前private 设置
修改前设置
$ oifcfg getif
en0 10.10.100.0 global cluster_interconnect
en2 192.168.60.0 global public
$
修改private ip,新网络端口号为en4:
$oifcfg setif -global en4/10.0.0.0:cluster_interconnect
$oifcfg delif -global en0
修改后设置
$oifcfg getif
en2 192.168.60.0 global public
en4 10.0.0.0 global cluster_interconnect
1.3 两边节点停止database和crs
$srvctl stop database -d wmsprd -o immediate
$srvctl start database -d wmsprd -o nomount
$crsctl stop crs
检查是否关闭
ps -ef|grep grid
ps -ef|grep oracle
srvctl start database -d wmsprd

cd /u01/app/oracle/grid/asm/bin
crsctl stop crs
crsctl start crs -all
crsctl start cluster -all
crsctl stop cluster -all

1.4 确认修改两边节点/etc/hosts表
#interconnect RAC & GPFSv
10.0.0.120 wms1-priv
10.0.0.122 wms2-priv

1.5 两边节点启动crs
$crsctl start crs
检查资源组状态
$crsctl status resource –t
如果都online,则没问题

SQL> show parameter control

NAME TYPE VALUE
------------------------------------ ---------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DG/wmsprd/controlfile/current.260.854807733
control_management_pack_access string DIAGNOSTIC+TUNING
SQL>

rman target /
RMAN> set DBID=3947322037
rman>restore controlfile to '+DG/wmsprd/controlfile/control01.ctl' from '+DG/wmsprd/controlfile/current.260.854807733';
SQL> alter system set control_files='+DG/wmsprd/controlfile/control01.ctl','+DG/wmsprd/controlfile/current.260.854807733' scope=spfile;

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】