Eclipsys Blog

Steps to Change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration 11.2 and Onwards – Eclipsys

Written by Edson Edewor | Nov 6, 2023 6:45:00 PM

The procedure outlined below describes the steps to change the hostname of a Grid Infrastructure with Oracle Restart Configuration. This is typically done when you need to reconfigure your Oracle environment due to server or network changes or a restore of a VM from the snapshot. Please note that these steps are for Oracle 19c Grid Infrastructure Installations.

 

1. Deconfigure the GI Cluster

[root@host01 install]# /u01/app/19.3.0.0/grid/crs/install/roothas.sh -deconfig -force

Using configuration parameter file: /u01/app/19.3.0.0/grid/crs/install/crsconfig_params

The log of the current session can be found at:

  /u01/app/oracle/crsdata/host01/crsconfig/hadeconfig.log

2023/10/12 02:37:44 CLSRSC-332: CRS resources for listeners are still configured

Redirecting to /bin/systemctl restart rsyslog.service

2023/10/12 02:38:26 CLSRSC-337: Successfully deconfigured Oracle Restart stack

 

2. Rename the Hostname from Host01 to Host02 using the below command

[root@host01 ~]# hostnamectl set-hostname host02

[oracle@ host01 admin]$ cat /etc/hostname

host02

[oracle@ host01 admin]$

Edit /etc/hosts file.

Open the /etc/hosts file and update any references to the old hostname with the new one.

Exit from the session and open a new terminal. The hostname should change to host02.

 

3. Reconfigure the GI Cluster using roothas.sh Script from the GI Home

[root@host02 ~]# cd /u01/app/19.3.0.0/grid

[root@host02 grid]# export ORACLE_HOME=/u01/app/19.3.0.0/grid

[root@host02 grid]# /u01/app/19.3.0.0/grid/crs/install/roothas.sh

Using configuration parameter file: /u01/app/19.3.0.0/grid/crs/install/crsconfig_params

The log of the current session can be found at:

  /u01/app/oracle/crsdata/host02/crsconfig/roothas_2023-10-12_02-43-42AM.log

Redirecting to /bin/systemctl restart rsyslog.service

LOCAL ADD MODE

Creating OCR keys for user ‘oracle’, privgrp ‘oinstall’…

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user ‘root’, privgrp ‘root’…

Operation successful.

CRS-4664: Node host02 successfully pinned.

2023/10/12 02:48:29 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’

 

host02     2023/10/12 02:49:24     /u01/app/oracle/crsdata/host02/olr/backup_20231012_024924.olr     3976270074

2023/10/12 02:49:25 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

 

4. Modify the ora.cssd resource on the GI

root@host02 grid]# pwd

/u01/app/19.3.0.0/grid

[root@host02 grid]# cd bin

[root@host02 bin]# ./crsctl modify resource “ora.cssd” -init -attr “AUTO_START=1”  -unsupported

 

5. Restart the High Availability Service

[root@host02 bin]# ./crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘host02’

CRS-2673: Attempting to stop ‘ora.evmd’ on ‘host02’

CRS-2677: Stop of ‘ora.evmd’ on ‘host02’ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘host02’ has been completed

CRS-4133: Oracle High Availability Services has been stopped.

 

[root@host02 bin]# ./crsctl start has

CRS-4123: Oracle High Availability Services has been started.

 

6. Add the Listener and ASM Resources on the Grid Infrastructure

[oracle@host02 bin]$. oraenv

ORACLE_SID = [XX]? +ASM

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@host02 bin]$

[oracle@host02 bin]$ srvctl add listener -l LISTENER -p 1521

[oracle@host02 bin]$ srvctl add asm -l LISTENER -p  /u01/app/19.3.0.0/grid/dbs/init+ASM.ora

 

7. Check the Status of the Grid Infrastructure

[oracle@host02 bin]$. oraenv

ORACLE_SID = [XX]? +ASM

[oracle@host02 bin]$ crsctl stat res -t

 

Reference

How to change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) 11.2 and Later (Doc ID 1552810.1)