This blog is about showing you, how to relink Oracle Restart (Grid Infrastructure) 21c on OEL 8.7. In case you have a full cluster installation, you might want to check out the following link as well.
Step 1: As the grid user (GRID owner) stop the (has) High Availability Services
[grid@ocm199 ~]$ id -a uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54330(racdba),54331(asmadmin),54332(asmdba),54333(asmoper) [grid@ocm199 ~]$ crsctl stop has CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ocm199' CRS-2673: Attempting to stop 'ora.FRA.dg' on 'ocm199' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'ocm199' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ocm199' CRS-2677: Stop of 'ora.DATA.dg' on 'ocm199' succeeded CRS-2677: Stop of 'ora.FRA.dg' on 'ocm199' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ocm199' succeeded CRS-2673: Attempting to stop 'ora.evmd' on 'ocm199' CRS-2673: Attempting to stop 'ora.asm' on 'ocm199' CRS-2677: Stop of 'ora.asm' on 'ocm199' succeeded CRS-2677: Stop of 'ora.evmd' on 'ocm199' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ocm199' CRS-2677: Stop of 'ora.cssd' on 'ocm199' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ocm199' has completed CRS-4133: Oracle High Availability Services has been stopped.
Step 2: As root user, unlock the (has) High Availability Services
[grid@ocm199 ~]$ su - Password: [root@ocm199 ~]# . oraenv ORACLE_SID = [root] ? +ASM The Oracle base has been set to /u01/app/oracle [root@ocm199 ~]# [root@ocm199 ~]# $ORACLE_HOME/crs/install/roothas.sh -unlock Using configuration parameter file: /u01/grid/21c/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/ocm199/crsconfig/haunlock__2023-05-05_08-31-37AM.log 2023/05/05 08:31:48 CLSRSC-347: Successfully unlock /u01/grid/21c [root@ocm199 ~]#
Step 3: Relink the Oracle Grid Infrastructure Standalone installation as follows (as grid user)
First of all, rename the $ORACLE_HOME/rdbms/lib/config.o file to force the creation of a new one:
[grid@ocm199 ~]$ ls -l $ORACLE_HOME/rdbms/lib/config.o -rw-r--r-- 1 grid oinstall 1352 Apr 28 11:33 /u01/grid/21c/rdbms/lib/config.o [grid@ocm199 ~]$ mv $ORACLE_HOME/rdbms/lib/config.o $ORACLE_HOME/rdbms/lib/config.o.20230504a [grid@ocm199 ~]$ ls -l $ORACLE_HOME/rdbms/lib/config.o* -rw-r--r-- 1 grid oinstall 1352 Apr 28 11:33 /u01/grid/21c/rdbms/lib/config.o.20230504a [grid@ocm199 ~]$
Now, start the relink process.
[grid@ocm199 ~]$ script /tmp/relink_has.txt Script started, file is /tmp/relink_has.txt [grid@ocm199 ~]$ id -a uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54330(racdba),54331(asmadmin),54332(asmdba),54333(asmoper) [grid@ocm199 ~]$ env| egrep 'ORA|PATH' | sort LD_LIBRARY_PATH=/u01/grid/21c/lib:/u01/grid/21c/lib32 MANPATH=: MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles MODULEPATH_modshare=/usr/share/Modules/modulefiles:2:/etc/modulefiles:2:/usr/share/modulefiles:2 MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH LD_PRELOAD ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/grid/21c ORACLE_SID=+ASM PATH=/home/grid/.local/bin:/home/grid/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/u01/grid/21c/bin:/u01/grid/21c/OPatch [grid@ocm199 ~]$ [grid@ocm199 ~]$ [grid@ocm199 ~]$ $ORACLE_HOME/bin/relink all writing relink log to: /u01/grid/21c/install/relinkActions2023-05-05_08-34-39AM.log [grid@ocm199 ~]$ [grid@ocm199 ~]$ exit exit Script done, file is /tmp/relink_has.txt [grid@ocm199 ~]$
After the relink finished, make sure that a new config.o file is present.
[grid@ocm199 ~]$ ls -l $ORACLE_HOME/rdbms/lib/config.o* -rw-r--r-- 1 grid oinstall 1352 May 5 08:34 /u01/grid/21c/rdbms/lib/config.o -rw-r--r-- 1 grid oinstall 1352 Apr 28 11:33 /u01/grid/21c/rdbms/lib/config.o.20230504a [grid@ocm199 ~]$ [grid@ocm199 ~]$ ls -l $ORACLE_HOME/bin/oracle* -rwsr-s--x 1 grid oinstall 475027096 May 5 08:35 /u01/grid/21c/bin/oracle [grid@ocm199 ~]$
Step 4: Connect as root user (different session) and lock back the Oracle Grid Infrastructure Standalone installation as follows:
[grid@ocm199 ~]$ su - Password: [root@ocm199 ~]# . oraenv ORACLE_SID = [root] ? +ASM The Oracle base has been set to /u01/app/oracle [root@ocm199 ~]# [root@ocm199 ~]# $ORACLE_HOME/crs/install/roothas.sh -postpatch Using configuration parameter file: /u01/grid/21c/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/ocm199/crsconfig/hapatch_2023-05-05_08-48-16AM.log 2023/05/05 08:48:18 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service' 2023/05/05 08:48:53 CLSRSC-672: Post-patch steps for patching GI home successfully completed. [root@ocm199 ~]#
Step 5: Verify that the all the OHAS services (ASM instance, diskgroups, listeners, DB instances, etc.) started. You might want to use the crsctl command for that.
[grid@ocm199 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE ocm199 STABLE ora.FRA.dg ONLINE ONLINE ocm199 STABLE ora.LISTENER.lsnr ONLINE INTERMEDIATE ocm199 Not All Endpoints Re gistered,STABLE ora.asm ONLINE ONLINE ocm199 Started,STABLE ora.ons OFFLINE OFFLINE ocm199 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cdb.db 1 OFFLINE OFFLINE Instance Shutdown,ST ABLE ora.cdb.pdb1.pdb 1 OFFLINE OFFLINE STABLE ora.cssd 1 ONLINE ONLINE ocm199 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE ocm199 STABLE -------------------------------------------------------------------------------- [grid@ocm199 ~]$
Ready.
Conclusion
It is not so complicated to relink the Oracle Restart (Grid Infrastructure) 21c on OEL 8.7.