IP Change in the Same Section of Oracle RAC Changing IP

Keywords: Big Data network DNS SQL Oracle

This article only describes IP, virtual IP and scan changes in the same segment of the public network, and will introduce IP changes in different segments later.

The experimental environment:

1. Stop RAC Cluster Services

Cluster services are stopped at two nodes:

[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 hosts files or dns records

The hosts file is used here and can be edited directly. If dns is used, the parsing records of dns need to be modified. Failure to parse results in failure of the change.

3. Restart each RAC node

Due to the change of public network IP, restart is required to take effect. After restart, the corresponding public network IP and virtual IP will change. The oracle cluster service will also start automatically and write new public network IP and virtual IP information into the ocr. At this point, public IP and virtual IP changes are completed.

4. Changing scan name and IP

  • Check 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 services
    [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 we change scan01 to scan02 and ip from 192.168.120.37 to 192.168.120.42.
    Before changing, make sure that the new scan can be parsed by dns or added to the hosts file. Otherwise, the following error will occur:
    [root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl modify scan -n scan02
    PRCS-1016 : Failed to resolve Single Client Access Name scan02
     Post-change validation:
    [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 the scan service
    [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

    Because the name of scan is changed, the database parameter remote_listener needs to be modified as follows:

SQL> show parameter remote_listener
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener                      string                 scan01:1521
//The changes are as follows:
SQL> alter system set remote_listener='scan02:1521' scope=spfile;
SQL> show parameter remote_listener
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener                      string                 scan02:1521
Note: In the process of installation, the public host name and private host name have been written into OCR, which can not be modified after installation. The solution is to delete the node, change the host name, and then re-join RAC.

Posted by kiwiwilliam on Mon, 16 Sep 2019 01:19:43 -0700