How to Change the Public IP and SCAN IP Adresses in Oracle RAC

Hi,

I will explain How to Change the Public IP Addresses in Oracle RAC in this post.

 

If you don’t know what is the Oracle RAC and how to Install Oracle RAC, then read the following articles.

What is the Oracle RAC and Architecture of Real Application Cluster

Oracle RAC Step by Step Installation on Linux -5

 

 

Step-1: Stop Database and Nodeapps on both nodes as follows.

[oracle@RACNODE1 ~]$ srvctl stop database -d MSDB

[oracle@RACNODE1 ~]$ srvctl stop nodeapps -n RACNODE1

[oracle@RACNODE1 ~]$ srvctl stop nodeapps -n RACNODE2

 

Check after stop services.

 

[oracle@RACNODE1 ~]$ srvctl status database -d MSDB

Instance MSDB1 is not running on node RACNODE2

Instance MSDB2 is not running on node RACNODE1



[oracle@RACNODE1 ~]$ srvctl status nodeapps -n RACNODE1

VIP is not running on node: RACNODE1

GSD is not running on node: RACNODE1

Listener is not running on node: RACNODE1

ONS daemon is not running on node: RACNODE1



[oracle@RACNODE1 ~]$ srvctl status nodeapps -n RACNODE2

VIP is not running on node: RACNODE2

GSD is not running on node: RACNODE2

Listener is not running on node: RACNODE2

ONS daemon is not running on node: RACNODE2

Step-2: Check the existing Interfaces then delete the Public Interface as follows.

[oracle@RACNODE1 ~]$ $GRID_HOME/bin/oifcfg getif

 

Eth0 is public interface, then delete it.

[oracle@RACNODE1 ~]$ $GRID_HOME/bin/oifcfg delif -global eth0/192.168.63.0

 

Step-3: Once you delete the old Interface successfuly, now set the new Interface and its subnet as follows.

 

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/oifcfg setif -global eth0/192.168.34.0:public

 

Step-4: Modify the VIP Addresses, then Stop all cluster as follows.

 

[oracle@RACNODE1 ~]$ srvctl modify nodeapps -n RACNODE1 -A 192.168.34.12/255.255.255.0/eth0
[oracle@RACNODE2 ~]$ srvctl modify nodeapps -n RACNODE2 -A 192.168.34.14/255.255.255.0/eth0

 

[oracle@RACNODE1 ~]$  crsctl stop cluster -all

 

Check if it is changed or not.

srvctl config nodeapps -n RACNODE1 -a

 

 

 

Step-5: Change the Public IP Addresses on OS Level. Then Reboot All Nodes

Modify the public IP address (eth0 or eth1 or eth2) in /etc/sysconfig/network-scripts/ifcfg-eth0 file for all nodes.

Modify /etc/hosts, tnsnames.ora and listener.ora files

 

Now Reboot All Nodes.

 

Step-6: Once reboot is done, RAC Services and database should be up automatically in a 5-10 minutes. Check if they are OK or not as follows.

 

[oracle@RACNODE1 ~]$ srvctl status database -d MSDB

Instance MSDB1 is running on node RACNODE2

Instance MSDB2 is running on node RACNODE1

 

[oracle@RACNODE1 ~]$ srvctl status nodeapps -n RACNODE1

VIP is running on node: RACNODE1

GSD is running on node: RACNODE1

Listener is running on node: RACNODE1

ONS daemon is running on node: RACNODE1



[oracle@RACNODE2 ~]$ srvctl status database -d MSDB

Instance MSDB1 is running on node RACNODE2

Instance MSDB2 is running on node RACNODE1



[oracle@RACNODE2 ~]$ srvctl status nodeapps -n RACNODE1

VIP is running on node: RACNODE1

GSD is running on node: RACNODE1

Listener is running on node: RACNODE1

ONS daemon is running on node: RACNODE1

 

 

Check all Cluster resource stats as follows.

 

[root@RACNODE1 ~]# crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    RACNODE2

ora....B2.inst application    ONLINE    ONLINE    RACNODE1

ora....DB1.srv application    ONLINE    ONLINE    RACNODE2

ora....DB2.srv application    ONLINE    ONLINE    RACNODE1

ora....BTAF.cs application    ONLINE    ONLINE    RACNODE2

ora.MSDB.db    application    ONLINE    ONLINE    RACNODE2

ora....B2.lsnr application    ONLINE    ONLINE    RACNODE2

ora.RACNODE2.gsd   application    ONLINE    ONLINE    RACNODE2

ora.RACNODE2.ons   application    ONLINE    ONLINE    RACNODE2

ora.RACNODE2.vip   application    ONLINE    ONLINE    RACNODE2

ora....B1.lsnr application    ONLINE    ONLINE    RACNODE1

ora.RACNODE1.gsd   application    ONLINE    ONLINE    RACNODE1

ora.RACNODE1.ons   application    ONLINE    ONLINE    RACNODE1

ora.RACNODE1.vip   application    ONLINE    ONLINE    RACNODE1

 

 

 

If you want to change SCAN IP of Oracle RAC, perform the following steps also.

 

Step-1: Stop Scan_listener and SCAN, then check its status as follows.

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl stop scan_listener
[oracle@RACNODE1 ~]$ $GRID_HOME/bin/srvctl stop scan
[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl status scan

 

Step-2: Check the existing IP adresses of SCAN NAME as follows.

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl config scan

 

Step-3: Change the SCAN IP of SCAN NAME from DNS Server.

After you change the IP Adresses of SCAN NAME, check if it is changed from Server using Nslookup SCAN_NAME command.

You should see the new IP Adresses with nslookup SCAN_NAME command.

 

Step-4: Update the SCAN IPs with the new IP addresses from the DNS entry as follows.

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl modify scan -n <scan_name>

[oracle@RACNODE1 ~]$ $GRID_HOME/bin/srvctl modify scan_listener -u

 

 

 

Step-5: Check the new SCAN IP, if they are changed successfully, then start SCAN and SCAN_LISTENER as follows.

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl config scan

 

[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl start scan
[oracle@RACNODE1 ~]$  $GRID_HOME/bin/srvctl start scan_listener



Do you want to use Oracle DBA Scripts All in One For Oracle RAC, then read the following articles.

https://ittutorial.org/oracle-dba-scripts-useful-database-administration-scripts-useful-oracle-rac-scripts/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *