登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

li.angshan 的博客

关注数据计算领域

 
 
 

日志

 
 
 
 

RAC中修改vip  

2009-10-29 12:02:52|  分类: oracle RAC技术 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

普通IP用oifcfg来更改

VIP如下更改

How to change VIP and VIP/Hostname in a 10g RAC/CRS environment.

 

 

PURPOSE

-------

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.

 

 

SCOPE & APPLICATION

-------------------

Customers and support analysts who need to change the VIP or VIP/Hostname.

 

 

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 

          inet addr:192.168.1.125  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  

          ...

          ...

=============================

 

        Note:  On the Windows platform, run the command 'ipconfig /all'.  This will

        list all IP addresses bound to a given adapter, including the VIP.

 

 

3.     Stop the nodeapps using srvctl commands:

       

       $ srvctl stop nodeapps -n rmsclnxclu1

 

       /etc/init.d/init.crs disable

       Yast2 runlevel 取消自动启动  修改/etc/hosts文件 然后重启

 

Note:  This will stop the VIP, GSD, Listener, and ONS daemon currently running on the nodes specified

 

 

4.      Verify that the VIP is no longer running by executing the 'ifconfig -a' command

        again, and confirm that the interface  (in our example it was 'eth0:1' is

        no longer listed in the output.  (Again, on Windows, run the command 'ipconfig /all')

       

        If the interface still shows as online, this is an indication that a resource which

        is dependent on the VIP is still running.  The crs_stat command can help to show

        resources that are still online.

 

5.      Make any changes necessary to all nodes' /etc/hosts files  (on Unix), or the

        \WINNT\System32\drivers\etc\hosts file (on Windows) and/or make the necessary

        DNS changes, to associate the new IP address with the old host name.

 

6.        Modify the nodeapps and provide the new virtual IP address.

           Use the srvctl modify nodeapps command with the following syntax:

              $/etc/init.d/init.crs start

        $ srvctl modify nodeapps -n rmsclnxclu1 -A 192.168.2.125/255.255.255.0/eth0

(在各自节点运行root下)

        Note:   This command should be run as root.  Attempting to run this command as the 'oracle' user or software owner will result in the following error:

       

        PRKO-2117 : This command should be executed as the system privilege user.

 

7.                            Start node-level applications.

8.                             

          $ srvctl start nodeapps -n rmsclnxclu1

 

Repeat the same steps for all the nodes in the cluster.

Since SRVCTL is a cluster wide management tool, you can accomplish these tasks for

any specific nodes from one node, without the need to login to each of the cluster nodes.

 

Note:   If only the IP address is changed, it is not necessary to make changes

to the LISTENER.ORA and TNSNAMES.ORA, provided they are using the vip hostnames for

the 'HOST=' entries.

 

If changing both the hostname and the VIP for a node, it will be necessary

to modify the LISTENER.ORA and change the 'HOST=' entries to the new VIP hostname.

This can be dopne manually, or by using the NETCA to remove the old listener and

create a new listener.   In addition, changes will need to be made to the TNSNAMES.ORA

of any clients connecting to the old HOSTNAME.

 

SRVCTL commands are documented in Appendix B of the RAC Admin Guide at:

http://download-west.oracle.com/ ... .101/b10765/toc.htm

  评论这张
 
阅读(229)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018