Changing the domain name of an existing Oracle RAC cluster requires more than changing the hostname at the operating-system level. The old domain may be referenced in DNS, operating-system configuration, Oracle Net files, VIP configuration, and SCAN resources.
This article describes the steps for changing the domain name of a two-node Oracle RAC cluster.
Example
Assume the existing nodes are:
and they need to be changed to:
The SCAN name changes from rac-scan.olddomain.com to rac-scan.newdomain.com.
1. Stop the databases
Before making the domain-name changes, stop all database instances running (if any) on the cluster.
For example:
Verify:
2. Update DNS
Update the DNS records to reflect the new domain name.
Review the records for:
Make sure the IP addresses themselves remain mapped correctly.
For SCAN, verify that the new SCAN name resolves to all configured SCAN IP addresses.
For example:
or:
3. Update the operating-system configuration
Review the operating-system files that may contain the old domain.
Depending on the Linux distribution and configuration, this may include:
For example, /etc/resolv.conf may contain:
which should be changed to:
Similarly, /etc/sysconfig/network may contain:
and /etc/sysctl.conf may contain:
4. Review Oracle Net configuration
Check the Oracle Grid Infrastructure and Database Oracle homes for references to the old domain.
Review files such as:
Search for the old domain:
Check for IFILE
tnsnames.ora may not contain the actual entry directly. It can reference another Oracle Net configuration file using IFILE.
For example:
Check for it with:
If an IFILE is configured, review the referenced file for the old domain as well.
5. Change the operating-system hostname
Check the current hostname:
For example:
Change the hostname to the new FQDN:
Repeat the operation on the second node:
Verify:
The expected result should be similar to:
The FQDN changes, while the RAC node short name remains the same.
6. Check the VIP configuration before modifying it
Oracle’s procedure includes changing the VIP when the VIP resource itself contains the old domain name.
However, this step may not be necessary in every RAC configuration.
Check the existing VIP configuration first:
For example, if the output is:
Then Clusterware stores only the short VIP name. In this case, there is no old domain name stored in the VIP resource, and the VIP modification step can be skipped.
However, if the configuration shows:
stop the VIP and modify it to use the new domain:
Then start and verify the VIP:
Repeat the same steps for the second node:
The important point is: do not modify the VIP blindly. First check whether the Clusterware VIP resource actually contains the old domain name.
7. Check the current SCAN configuration
Check SCAN:
For example:
Unlike the VIP configuration, SCAN commonly contains the full domain name.
8. Stop the SCAN listeners and SCAN
As the Grid Infrastructure owner:
Verify that the resources are stopped if necessary:
9. Change the SCAN name
After the DNS records for the new SCAN name are configured, modify SCAN.
Run the modification from root user:
Verify the new configuration:
Expected:
10. Update the SCAN listeners
Update the SCAN listener configuration:
Start the SCAN listeners:
Then verify:
All SCAN VIPs and SCAN listeners should be online.
11. Stop Oracle Clusterware
Once the required changes have been completed, stop Clusterware on all nodes:
Verify that Clusterware shuts down cleanly.
12. Restart the RAC nodes
Restart all RAC nodes using the normal operating-system procedure:
After the nodes return, verify the hostname:
Expected:
Repeat the validation on every RAC node.
13. Validate node name resolution
Check the node names:
Expected:
14. Validate VIP resolution
Check the VIP names:
Expected:
Even when Clusterware stores the VIP as only rac1-vip, the operating system should resolve that short name correctly.
15. Validate SCAN resolution
First retrieve the exact SCAN configured in Clusterware:
Then validate that exact name:
or:
For a three-SCAN-VIP configuration, all three expected IP addresses should resolve.
Example:
16. Validate RAC node membership
Run:
The RAC node names should normally remain the same short names:
This was also the result after the domain change in the tested cluster.
17. Validate Clusterware resources
Run:
Verify that the important RAC resources are online, including:
After the tested domain change and restart, the node VIPs, three SCAN VIPs, SCAN listeners, ASM, and other Clusterware resources returned to ONLINE state.
18. Validate nodeapps and SCAN
Run:
Confirm:
- the node VIPs have the expected names and IP addresses
- the SCAN uses the new domain
- all expected SCAN VIP addresses are present
For example:
and:
19. Run Cluster Verification Utility
Finally, run the appropriate Cluster Verification Utility checks.
For example:
or the appropriate cluvfy command for your Grid Infrastructure version and environment.
Validate:
- hostname resolution
- node connectivity
- public network
- private interconnect
- VIPs
- SCAN
- SCAN listeners
- Clusterware
- ASM
- database connectivity
Also search the system and Oracle configuration for any remaining references to the old domain:
Review the results carefully rather than automatically replacing every occurrence.