How to Change the Domain Name of an Oracle RAC Cluster
August 21, 2026 Leave a comment
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:
rac1.olddomain.comrac2.olddomain.com
and they need to be changed to:
rac1.newdomain.comrac2.newdomain.com
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:
srvctl stop database -d <DB_UNIQUE_NAME>
Verify:
srvctl status database -d <DB_UNIQUE_NAME>
2. Update DNS
Update the DNS records to reflect the new domain name.
Review the records for:
rac1.newdomain.comrac2.newdomain.comrac1-vip.newdomain.comrac2-vip.newdomain.comrac-scan.newdomain.com
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:
nslookup rac-scan.newdomain.com
or:
dig rac-scan.newdomain.com
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:
/etc/hosts/etc/resolv.conf/etc/sysconfig/network/etc/sysctl.conf
For example, /etc/resolv.conf may contain:
search olddomain.com
which should be changed to:
search newdomain.com
Similarly, /etc/sysconfig/network may contain:
DOMAINNAME=olddomain.com
and /etc/sysctl.conf may contain:
kernel.domainname=olddomain.com
4. Review Oracle Net configuration
Check the Oracle Grid Infrastructure and Database Oracle homes for references to the old domain.
Review files such as:
<GI_HOME>/network/admin/tnsnames.ora<DB_HOME>/network/admin/tnsnames.ora<GI_HOME>/network/admin/listener.ora<DB_HOME>/network/admin/sqlnet.ora
Search for the old domain:
grep -Ri "olddomain.com" <GI_HOME>/network/admingrep -Ri "olddomain.com" <DB_HOME>/network/admin
Check for IFILE
tnsnames.ora may not contain the actual entry directly. It can reference another Oracle Net configuration file using IFILE.
For example:
IFILE=/path/to/additional_tnsnames.ora
Check for it with:
grep -i '^[[:space:]]*IFILE' <GI_HOME>/network/admin/tnsnames.oragrep -i '^[[:space:]]*IFILE' <DB_HOME>/network/admin/tnsnames.ora
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:
hostnamehostname -fhostname -shostnamectl
For example:
hostname -frac1.olddomain.comhostname -srac1
Change the hostname to the new FQDN:
hostnamectl set-hostname rac1.newdomain.com
Repeat the operation on the second node:
hostnamectl set-hostname rac2.newdomain.com
Verify:
hostnamehostname -fhostname -s
The expected result should be similar to:
hostname -frac1.newdomain.comhostname -srac1
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:
<GI_HOME>/bin/srvctl config vip -node rac1<GI_HOME>/bin/srvctl config vip -node rac2
For example, if the output is:
VIP exists: network number 1, hosting node rac1VIP Name: rac1-vipVIP IPv4 Address: 192.168.1.101
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:
VIP Name: rac1-vip.olddomain.com
stop the VIP and modify it to use the new domain:
# As GI owner<GI_HOME>/bin/srvctl stop vip -node rac1 -force
# As root<GI_HOME>/bin/srvctl modify vip \ -node rac1 \ -address rac1-vip.newdomain.com/255.255.255.0/<public_interface> \ -netnum 1
Then start and verify the VIP:
# As GI owner<GI_HOME>/bin/srvctl start vip -node rac1<GI_HOME>/bin/srvctl config vip -node rac1<GI_HOME>/bin/srvctl status vip -node rac1
Repeat the same steps for the second node:
# As GI owner<GI_HOME>/bin/srvctl stop vip -node rac2 -force
# As root<GI_HOME>/bin/srvctl modify vip \ -node rac2 \ -address rac2-vip.newdomain.com/255.255.255.0/<public_interface> \ -netnum 1
# As GI owner<GI_HOME>/bin/srvctl start vip -node rac2<GI_HOME>/bin/srvctl config vip -node rac2<GI_HOME>/bin/srvctl status vip -node rac2
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:
<GI_HOME>/bin/srvctl config scan
For example:
SCAN name: rac-scan.olddomain.com, Network: 1
Unlike the VIP configuration, SCAN commonly contains the full domain name.
8. Stop the SCAN listeners and SCAN
As the Grid Infrastructure owner:
<GI_HOME>/bin/srvctl stop scan_listener<GI_HOME>/bin/srvctl stop scan
Verify that the resources are stopped if necessary:
<GI_HOME>/bin/srvctl status scan<GI_HOME>/bin/srvctl status scan_listener
9. Change the SCAN name
After the DNS records for the new SCAN name are configured, modify SCAN.
Run the modification from root user:
<GI_HOME>/bin/srvctl modify scan -n rac-scan.newdomain.com
Verify the new configuration:
<GI_HOME>/bin/srvctl config scan
Expected:
SCAN name: rac-scan.newdomain.com, Network: 1
10. Update the SCAN listeners
Update the SCAN listener configuration:
<GI_HOME>/bin/srvctl modify scan_listener -u
Start the SCAN listeners:
<GI_HOME>/bin/srvctl start scan_listener
Then verify:
<GI_HOME>/bin/srvctl status scan<GI_HOME>/bin/srvctl status scan_listener
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:
# As root<GI_HOME>/bin/crsctl stop cluster -all
Verify that Clusterware shuts down cleanly.
12. Restart the RAC nodes
Restart all RAC nodes using the normal operating-system procedure:
reboot
After the nodes return, verify the hostname:
hostnamehostname -f
Expected:
rac1.newdomain.com
Repeat the validation on every RAC node.
13. Validate node name resolution
Check the node names:
getent hosts rac1getent hosts rac2
Expected:
192.168.1.1 rac1.newdomain.com192.168.1.2 rac2.newdomain.com
14. Validate VIP resolution
Check the VIP names:
getent hosts rac1-vipgetent hosts rac2-vip
Expected:
192.168.1.101 rac1-vip.newdomain.com192.168.1.102 rac2-vip.newdomain.com
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:
srvctl config scan
Then validate that exact name:
getent hosts rac-scan.newdomain.com
or:
dig rac-scan.newdomain.com
For a three-SCAN-VIP configuration, all three expected IP addresses should resolve.
Example:
192.168.1.201 rac-scan.newdomain.com192.168.1.202 rac-scan.newdomain.com192.168.1.203 rac-scan.newdomain.com
16. Validate RAC node membership
Run:
olsnodes
The RAC node names should normally remain the same short names:
rac1rac2
This was also the result after the domain change in the tested cluster.
17. Validate Clusterware resources
Run:
crsctl status resource -t
Verify that the important RAC resources are online, including:
ora.LISTENER.lsnrora.asmora.rac1.vipora.rac2.vipora.scan1.vipora.scan2.vipora.scan3.vipora.LISTENER_SCAN1.lsnrora.LISTENER_SCAN2.lsnrora.LISTENER_SCAN3.lsnr
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:
srvctl config nodeapps -asrvctl config scan
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:
VIP Name: rac1-vipVIP IPv4 Address: 192.168.1.101VIP Name: rac2-vipVIP IPv4 Address: 192.168.1.102
and:
SCAN name: rac-scan.newdomain.com
19. Run Cluster Verification Utility
Finally, run the appropriate Cluster Verification Utility checks.
For example:
cluvfy stage -post crsinst -n rac1,rac2
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:
grep -Ri "olddomain.com" /etc 2>/dev/nullgrep -Ri "olddomain.com" <GI_HOME>/network/admin 2>/dev/nullgrep -Ri "olddomain.com" <DB_HOME>/network/admin 2>/dev/null
Review the results carefully rather than automatically replacing every occurrence.