Oracle11gR2 修改 VIP

 在使用oracle的过程中,难免会遇到需要修改VIP的情况,下面就是oracle官方文档给出的步骤,大家在修改的过程中还是需要按照官方文档来实施:


来自:http://docs.oracle.com/cd/E11882_01/rac.112/e16794/admin.htm#BGBGDHFG

         ---------Changing the Virtual IP Addresses


Perform the following steps to change a VIP address:

通过以下步骤修改VIP:

  1. Stop all services running on the node whose VIP address you want to change using the following command syntax, where database_name is the name of the database, service_name_list is a list of the services you want to stop, and my_node is the name of the node whose VIP address you want to change:

    停止服务

    srvctl stop service -d database_name  -s service_name_list -n my_node
    

    This example specifies the database name (grid) using the -d option and specifies the services (sales,oltp) on the appropriate node (mynode).

    $ srvctl stop service -d grid -s sales,oltp -n mynode
    
  2. Confirm the current IP address for the VIP address by running the srvctl config vip command. This command displays the current VIP address bound to one of the network interfaces. The following example displays the configured VIP address:

    检查当前的VIP设置

    $ srvctl config vip -n stbdp03
    VIP exists.:stbdp03
    VIP exists.: /stbdp03-vip/192.168.2.20/255.255.255.0/eth0
    
  3. Stop the VIP resource using the srvctl stop vip command:

    停止VIP

    $ srvctl stop vip -n mynode
    
  4. Verify that the VIP resource is no longer running by running the ifconfig -a command on Linux and UNIX systems (or issue the ipconfig /all command on Windows systems), and confirm that the interface (in the example it was eth0:1) is no longer listed in the output.

    确认VIP已经停止

  5. Make any changes necessary to the /etc/hosts files on all nodes on Linux and UNIX systems, or the %windir%\system32\drivers\etc\hosts file on Windows systems, and make any necessary DNS changes to associate the new IP address with the old host name.

    根据需要修改,以确认新IP和计算机名可以正确解析

  6. To use a different subnet or NIC for the default network before you change any VIP resource, you must use the srvctl modify network -Ssubnet/netmask/interface command as root to change the network resource, where subnet is the new subnet address, netmask is the new netmask, andinterface is the new interface. After you change the subnet, then you must change each node's VIP to an IP address on the new subnet, as described in the next step.

    使用其他的网卡或者子网作为默认网络

  7. Modify the node applications and provide the new VIP address using the following srvctl modify nodeapps syntax:

    修改VIP

    $ srvctl modify nodeapps -n node_name -A new_vip_address
    

    The command includes the following flags and values:

    • -n node_name is the node name

    • -A new_vip_address is the node-level VIP address: name|ip/netmask/[if1[|if2|...]]

      For example, issue the following command as the root user:

      srvctl modify nodeapps -n mynode -A 192.168.2.125/255.255.255.0/eth0
      

      Attempting to issue this command as the installation owner account may result in an error. For example, if the installation owner is oracle, then you may see the error PRCN-2018: Current user oracle is not a privileged user.To avoid the error, run the command as the root or system administrator account.

  8. Start the node VIP by running the srvctl start vip command:

    启动VIP

    $ srvctl start vip -n node_name
    

    The following command example starts the VIP on the node named mynode:

    $ srvctl start vip -n mynode
    
  9. Repeat the steps for each node in the cluster.

    为集群中的每个节点重复执行上面的步骤

    Because the SRVCTL utility is a clusterwide management tool, you can accomplish these tasks for any specific node from any node in the cluster, without logging in to each of the cluster nodes.

  10. Run the following command to verify node connectivity between all of the nodes for which your cluster is configured. This command discovers all of the network interfaces available on the cluster nodes and verifies the connectivity between all of the nodes by way of the discovered interfaces. This command also lists all of the interfaces available on the nodes which are suitable for use as VIP addresses.

    检验节点间的连接

    $ cluvfy comp nodecon -n all -verbose 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值