Oracle RAC change IP network segment of the IP changes

This paper describes only the same public IP network, and scan the virtual IP change IP change will introduce different segments later.

lab environment:

Oracle RAC change IP network segment of the IP changes

1, stop the RAC cluster services

In the two nodes to stop cluster services are:

[root@odb09 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
[root@odb10 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs

2, change the hosts file or dns records

As used herein the hosts file can be edited directly. If the dns, dns need to modify the resolution records. If the resolution fails, the change will lead to failure.

3, each RAC node reboot

Due to changes in the public network IP, you need to restart to take effect. After the reboot is complete, the corresponding public IP and virtual IP will change. The oracle cluster service will start automatically, and the new public IP and virtual IP information is written in ocr. This, Public IP and virtual IP change is complete.

4, change the name and IP scan

  • Check the current scan information
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
    SCAN name: scan01, Network: 1/192.168.120.0/255.255.255.0/eth0
    SCAN VIP name: scan1, IP: /scan01/192.168.120.37
  • Stop SCAN and scan listener service
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl stop scan_listener
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl stop scan
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan
    SCAN VIP scan1 is enabled
    SCAN VIP scan1 is not running
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is not running
  • Change scan information
    here scan01 change scan02, ip 192.168.120.42 changed by the 192.168.120.37.
    在更改前,确保新的scan可以通过dns解析或者以加入hosts文件,否则会出现如下报错:
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl modify scan -n scan02
    PRCS-1016 : Failed to resolve Single Client Access Name scan02
    变更后验证:
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
    SCAN name: scan02, Network: 1/192.168.120.0/255.255.255.0/eth0
    SCAN VIP name: scan1, IP: /scan02/192.168.120.42
  • Start service scan
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl start scan
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl start scan_listener
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan
    SCAN VIP scan1 is enabled
    SCAN VIP scan1 is running on node odb10
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node odb10

    Since the name change scan, so it needs to modify the database parameters remote_listener, as follows:

SQL> show parameter remote_listener
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener                      string                 scan01:1521
变更后如下:
SQL> alter system set remote_listener='scan02:1521' scope=spfile;
SQL> show parameter remote_listener
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener                      string                 scan02:1521
Note: During the installation process, the public has been the host name and private host name into the OCR can not be modified after installation. The solution is to delete nodes, change the host name, and then rejoin the RAC can be.

Guess you like

Origin blog.51cto.com/candon123/2438277