Changing Internet Protocol (IP) Address on Oracle Real Application Clusters (RAC)
Abstract
When required to move the Oracle database that is in a Real Application Cluster (RAC) to a new network/IP address it can take some time and be over whelming if you don’t know what is involved. The steps that we followed made it easy and successful for us to move both our test and production RAC systems to new IP addresses within a 6 hour window of time and ensured that all services were able to come up and be ready to use.
I have provided these steps below for general purpose information. The format which this post is written is is similar to an Oracle white paper that you can find on Metalink.
Documented Steps to change RAC IP Addresses
- Log on to the one of the cluster servers.
- Change directory to the $CRS_HOME\bin
-
Query the OCR for the current settings in the RAC. This will provide the current setting for the networks that are setup in the cluster.
- $CRS_HOME\bin\oifcfg iflist
- $CRS_HOME\bin\oifcfg iflist
-
Query the OCR to find out what network is using which interface. This is similar to the command above; however, this will just return the public and cluster_interconnect settings.
- $CRS_HOME\bin\oifcfg getif
- $CRS_HOME\bin\oifcfg getif
-
Next we need to find out what VIP addresses are assigned to the node apps.
- $CRS_HOME\bin\srvctl config nodeapps –n <node name> -a –g –l –s
- $CRS_HOME\bin\srvctl config nodeapps –n <node name> -a –g –l –s
-
Once we have all of the current settings documented we can bring down the cluster and all the associated services. This could be done with crs_ctl –stop all but there are problems with bringing the cluster down this way unless Oracle Support recommends this. On this step we will run a series of SRVCTL commands that will bring down the cluster and notify us of any errors that may come up.
- $CRS_HOME\bin\srvctl stop database –d orcl –o immediate
-
$CRS_HOME\bin\srvctl stop asm –n <node name>
- repeat for the number of ASM instances the cluster is using
- repeat for the number of ASM instances the cluster is using
-
$CRS_HOME\bin\srvctl stop nodeapps –n <node name>
- run the command for each node in the cluster
- run the command for each node in the cluster
- $CRS_HOME\bin\srvctl stop database –d orcl –o immediate
-
Backup the voting disk and OCR before proceeding. This will ensure that both the voting disk and OCR can be recovered if needed.
- $CRS_HOME\bin\crsctl query css votedisk
- Ocopy \\.\votedisk1 <file system location>
- Ocrconfig –export <file system location> -s online
- $CRS_HOME\bin\crsctl query css votedisk
-
Restart the Cluster Ready Services (CRS)
-
$CRS_HOME\bin\srvctl start nodeapps –n <node name>
- run the command for each node in the cluster
- run the command for each node in the cluster
-
-
Change the IP Addresses for all the public and private interfaces that the RAC uses
-
Change the public interface
- $CRS_HOME\bin\oifcfg delif –global <interface name>
- $CRS_HOME\bin\oifcfg setif –global <interface name>/#.#.#.0:public
- $CRS_HOME\bin\oifcfg delif –global <interface name>
-
Change the interconnect interface (private)
- $CRS_HOME\bin\oifcfg delif –global <interface name>
- $CRS_HOME\bin\oifcfg setif –global <interface name>/#.#.#.0:cluster_interconnect
- $CRS_HOME\bin\oifcfg delif –global <interface name>
-
-
Change the VIP ip addressing for the node apps
-
$CRS_HOME\bin\srvctl modify nodeapps –n <node name> -A <new vip address>/<subnet mask>/<interface name>
- run this command for each node in the cluster that will be assigned a new vip address
- run this command for each node in the cluster that will be assigned a new vip address
-
- Update the tnsnames.ora and listener.ora file entries to reflect ip address changes for the vips if needed. If using DNS this should not be needed but worth checking.
-
Flush the DNS for each server (windows only)
- Ipconfig /flushdns
- Ipconfig /flushdns
- Ensure all the proper entries are in the /etc/hosts file (on windows c:\windows\system32\drivers\etc\hosts). Be sure not to put tabs in the file. If tabs are inserted into the file this will prevent the pinging between nodes on the cluster_interconnect.
-
Bring up the rest of the cluster applications (database, listener, asm)
- $CRS_HOME\bin\srvctl start asm –n <node name>
- $CRS_HOME\bin\srvctl start database –d <database name> -o open
- $CRS_HOME\bin\srvctl start listener –n <node name> -l <listener name>
- $CRS_HOME\bin\srvctl start asm –n <node name>
- At this point all cluster services should be online.
In the environment which our cluster runs, we use Oracle Grid Control (GC) to manage the cluster and other databases. With changing IP addresses the Oracle Management Server (OMS) piece of GC cache needs to be cleared out. By clearing the cache this will allow for the new IP address to be associated with the cluster hostnames in GC and allow for the follow of data during uploads.
- Log into the grid control OMS host server
-
Stop the OMS servers
- $OMS_HOME\opmn\bin\opmnctl stopall
- $OMS_HOME\opmn\bin\opmnctl stopall
-
Start the OMS server
- $OMS_HOME\opmn\bin\opmnctl startall
- $OMS_HOME\opmn\bin\opmnctl startall
References
Oracle Metalink Note: 276434.1,Oracle Metalink Note: 283684.1,Oracle Database 10g : Real Application Cluster Handbook
Current Oracle Certs
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.
vrwydkjhflzxorxjmimpratskbqjhy https://association-radar.org/local/cache-css/%D0%BE%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD-%D0%BA%D0%B0%D0%B7%D0%B8%D0%BD%D0%BE.html