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 -A 10.182.15.91/255.255.255.0/eth0
[root@rac1 bin]# ./srvctl modify nodeapps -n rac2 -A 10.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 set local_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))';
参考文档:
MetaLink Note:276434.1How to change VIP and VIP/Hostname in a 10g RAC/CRS environment.
 
To illustrate the changing of a Virtual IP Address (VIP) in an Oracle10g RAC/CRS environment.
 
Oracle 10g use VIP (Virtual IP) for clients to connect to the database. VIP solves all time-outs entering the TCP/IP stack resulting higher application availability. This VIP is a static IP with a hostname defined and resolved thru DNS. During the installation of CRS users where prompted to enter a Virtual IP and Virtual Hostname for each of the node in the cluster. These are stored in
OCR and different components within 10g HA framework depends on these VIPs. If for reason customer wants to change either the VIP or the VIP/Hostname use the following procedure.
 
Note:
Changing the VIP involves modification of the nodeapps, which includes the Virtual IP address, the GSD, the Listener, and Oracle Notification Services (ONS). The VIP can be modified while the nodeapps are running, however changes will not take effect until the VIP, and hence the nodeapps, are restarted. Other resources on a node, such as database instances and ASM instances, are dependent on the VIP, so stopping the nodeapps will only take the VIP offline if these other resources are stopped.
 
How to change the VIP address only.   This example assumes that the host name associated with the VIP will not change - just the IP address itself.
 
 
1. Stop all resources that are dependent on the VIP on a given node. This includes all RAC database instances on that node, as well as the ASM instance on that node, if it exists and is being used:
  
  1a).  Stop database instances:
        $ srvctl stop instance -d grid -i grid1
 
Where the database name is specified via the '-d' option, and the instance on the appropriate node is specified with the '-i' option.
 
        Alternatively, to stop the entire database, on all nodes, you can issue
        the stop database command:
 
        $ srvctl stop database -d grid
 
  1b).  To stop the ASM instance on the node, issue the following command:
 
        $ srvctl stop asm -n rmsclnxclu1
 
Note:  It is not necessary to use srvctl to stop the database and ASM instance these resources can be stopped via SQL*Plus and/or, on the Windows platform. by stopping the associated services.
       
2. Confirm the current IP address for the VIP by running the command 'ifconfig -a'         This should show you the current VIP, bound to one of the network interfaces. In the example below, it shows as 'eth0:1'   
 
eth0:1    Link encap:Ethernet  HWaddr 00:01:03:2C:69:BB 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值