ITPub博客

首页 > 数据库 > Oracle > 基于不同网段的RAC架构VIP修改

基于不同网段的RAC架构VIP修改

原创 Oracle 作者:龙山游龙 时间:2016-09-18 10:21:15 1 删除 编辑

--确认集群当前状态
# crsctl check crs
# crs_stat -t

--关闭集群当前服务
# srvctl stop database -d raw
# srvctl stop asm -n s1-11g
# srvctl stop asm -n s2-11g
# srvctl stop nodeapps -n s1-11g
# srvctl stop nodeapps -n s2-11g

--查看当前配置:
[grid@s1-11g oracle]# oifcfg getif -global
eth0  192.168.72.0  global  public
eth1  10.0.0.0  global  cluster_interconnect

--删除当前配置
[grid@s1-11g oracle]# oifcfg delif -global eth0
[grid@s1-11g oracle]# oifcfg delif -global eth1
[grid@s1-11g oracle]# oifcfg getif

--重新添加
[grid@s1-11g oracle]# oifcfg setif -global eth0/192.168.200.0:public
[grid@s1-11g oracle]# oifcfg setif -global eth1/11.11.11.0:cluster_interconnect
[grid@s1-11g oracle]# oifcfg getif
eth0  192.168.200.0  global  public
eth1  11.0.0.0  global  cluster_interconnect
 
[grid@s1-11g oracle]# oifcfg iflist
eth0  192.168.200.0
eth1  11.0.0.0

--启动集群当前服务
# srvctl start database -d raw
# srvctl start asm -n s1-11g
# srvctl start asm -n s2-11g
# srvctl start nodeapps -n s1-11g
# srvctl start nodeapps -n s2-11g

--关闭相关集群服务
[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博客 ” ,链接:https://blog.itpub.net/30310891/viewspace-2125089/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
传统商业、开源和国产据库领域十从业经验,TB级高并发数据库的管理经验。对于数据库内部原理、体系结构,数据页/块结构原理有着深刻认识;对于数据库新特性、分布式高可用架构和性能调优有着丰富的的实战经验。擅长故障诊断以及数据库异常打开及数据灾难挽救。

注册时间:2015-06-28

  • 博文量
    178
  • 访问量
    334691