Thursday, October 31, 2019

How To Relink The Oracle Grid Infrastructure Standalone (Restart) Installation Or Oracle Grid Infrastructure RAC/Cluster Installation (11.2 or 12c). (Doc ID 1536057.1)

In this Document
Goal
Solution
 A) How To Relink The Oracle Grid Infrastructure Standalone (Restart) Installation.
 B) How To Relink The Oracle Grid Infrastructure RAC/Cluster Installation.
 Community Discussions
References


APPLIES TO:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

GOAL


In order to relink the Oracle Grid Infrastructure Standalone (Restart) Installation (Non-RAC) or  Oracle Grid Infrastructure RAC/Cluster Installation (11.2 or 12c)  please follow the next steps:

SOLUTION


A) How To Relink The Oracle Grid Infrastructure Standalone (Restart) Installation.


In order to relink the Oracle Grid Infrastructure Standalone (Restart) Installation (Non-RAC), please follow the next steps:


1) Stop the OHAS stack (as “grid” OS user):
[grid@dbaasm ~]$ id
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1200(dba),1300(asmdba),1301(asmoper)


[grid@dbaasm ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/grid

[grid@dbaasm ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbaasm'
CRS-2673: Attempting to stop 'ora.SPFILE.dg' on 'dbaasm'
CRS-2673: Attempting to stop 'ora.db1.db' on 'dbaasm'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'dbaasm'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'dbaasm' succeeded
CRS-2677: Stop of 'ora.db1.db' on 'dbaasm' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'dbaasm'
CRS-2673: Attempting to stop 'ora.RECO.dg' on 'dbaasm'
CRS-2677: Stop of 'ora.DATA.dg' on 'dbaasm' succeeded
CRS-2677: Stop of 'ora.RECO.dg' on 'dbaasm' succeeded
CRS-2677: Stop of 'ora.SPFILE.dg' on 'dbaasm' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'dbaasm'
CRS-2677: Stop of 'ora.asm' on 'dbaasm' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'dbaasm'
CRS-2677: Stop of 'ora.cssd' on 'dbaasm' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'dbaasm'
CRS-2677: Stop of 'ora.evmd' on 'dbaasm' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbaasm' has completed
CRS-4133: Oracle High Availability Services has been stopped.


2) Connect as root user (different session) and unlock the Oracle Grid Infrastructure Standalone installation as follows:
[grid@dbaasm ~]$ su -
Password:
[root@dbaasm ~]# id

uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

[root@dbaasm ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/grid

[root@dbaasm ~]# $ORACLE_HOME/crs/install/roothas.pl -unlock
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params

Successfully unlock /u01/app/grid/product/11.2.0/grid
  
Note: On 12.1/12.2/18c releases, roothas.sh can be used instead of roothas.pl. Command to unlock the GI home is <GI home>/crs/install/roothas.sh -unlock


3) Then relink the Oracle Grid Infrastructure Standalone installation as follows (as grid user):

3.1) First of all, rename the $ORACLE_HOME/rdbms/lib/config.o file (located at the Oracle Grid Infrastructure Standalone installation) to force a regeneration:
[grid@dbaasm ~]$ ls -l $ORACLE_HOME/rdbms/lib/config.o
-rw-r--r-- 1 grid oinstall 1256 Sep 18 23:03 /u01/app/grid/product/11.2.0/grid/rdbms/lib/config.o

[grid@dbaasm ~]$ mv $ORACLE_HOME/rdbms/lib/config.o $ORACLE_HOME/rdbms/lib/config.o_BAK

[grid@dbaasm ~]$ ls -l $ORACLE_HOME/rdbms/lib/config.o*
-rw-r--r-- 1 grid oinstall 1256 Sep 18 23:03 /u01/app/grid/product/11.2.0/grid/rdbms/lib/config.o_BAK


3.2) Then relink the the Oracle Grid Infrastructure Standalone installation:

[grid@dbaasm ~]$ script /tmp/relink_gi.txt
Script started, file is /tmp/relink_gi.txt
[grid@dbaasm ~]$
[grid@dbaasm ~]$ id
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1200(dba),1300(asmdba),1301(asmoper)

[grid@dbaasm ~]$ env| egrep 'ORA|PATH' | sort
LD_LIBRARY_PATH=/u01/app/grid/product/11.2.0/grid/lib
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
ORACLE_SID=+ASM
PATH=/usr/lib64/qt-3.3/bin:/usr/NX/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/grid/bin:.:/u01/app/grid/product/11.2.0/grid/bin

[grid@dbaasm ~]$ $ORACLE_HOME/bin/relink all

writing relink log to: /u01/app/grid/product/11.2.0/grid/install/relink.log


[grid@dbaasm ~]$ exit
exit
Script done, file is /tmp/relink_gi.txt
[grid@dbaasm ~]$


4) Connect as root user (different session) and lock back the Oracle Grid Infrastructure Standalone installation as follows:

[grid@dbaasm ~]$ su -
Password:
[root@dbaasm ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/grid


[root@dbaasm ~]# $ORACLE_HOME/rdbms/install/rootadd_rdbms.sh

[grid@dbaasm ~]$ su -
Password:
[root@dbaasm ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/grid


[root@dbaasm ~]# $ORACLE_HOME/crs/install/roothas.pl -patch
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
CRS-4123: Oracle High Availability Services has been started.

On 12.1/12.2/18c, to lock back the GI Home use command <Grid oracle home>/crs/install/roothas.sh -postpatch

Note: OHAS services (ASM instance, diskgroups, listeners, DB instances, etc.) will automatically start.


5) Verify that the all the OHAS services (ASM instance, diskgroups, listeners, DB instances, etc.) started:
[root@dbaasm ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ACFSBIG.dg
               ONLINE  ONLINE       dbaasm                                       
ora.DATA.dg
               ONLINE  ONLINE       dbaasm                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       dbaasm                                       
ora.RECO.dg
               ONLINE  ONLINE       dbaasm                                       
ora.SPFILE.dg
               ONLINE  ONLINE       dbaasm                                       
ora.asm
               ONLINE  ONLINE       dbaasm                   Started             
ora.ons
               OFFLINE OFFLINE      dbaasm                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       dbaasm                                       
ora.db1.db
      1        ONLINE  ONLINE       dbaasm                   Open                
ora.diskmon
      1        OFFLINE OFFLINE                                                   
ora.evmd
      1        ONLINE  ONLINE       dbaasm                                       
[root@dbaasm ~]#



B) How To Relink The Oracle Grid Infrastructure RAC/Cluster Installation.


In order to relink the Oracle Grid Infrastructure RAC/Cluster Installation, please follow the next steps after stopping all the services running:

1) As root OS user, please unlock the Grid Infrastructure Oracle Home (on every node) as follows:
# cd < Grid Infrastructure Oracle Home >/crs/install
# perl rootcrs.pl -unlock

Note: On 12.1/12.2/18c releases, rootcrs.sh can be used instead of rootcrs.pl. Command as "rootcrs.sh -unlock"


2) As the Oracle Grid Infrastructure owner (on every node) relink the Grid Infrastructure Oracle Home as follows:
$ export ORACLE_HOME=< Grid Infrastructure Oracle Home >
$ < Grid Infrastructure Oracle Home>/bin/relink all


3) As root OS user again, please execute the next commands (on every node):
# cd < Grid Infrastructure Oracle Home >/rdbms/install/
# ./rootadd_rdbms.sh
# cd < Grid Infrastructure Oracle Home >/crs/install
# perl rootcrs.pl -patch

On 12.1, use "rootcrs.sh -patch". On 12.2/18c, use "rootcrs.sh -lock" then "crsctl start crs"
 
Note: CRS services (CRS, CSS ASM instances, diskgroups, listeners, DB instances, etc.) will automatically start.
 
4) Please review the relink.log file located at the following directory (to confirm or discard any error):
$ < Grid Infrastructure Oracle Home>/install/relink.log




Community Discussions

Still have questions? Use the communities window below to search for similar discussions or start a new discussion on this subject. (Window is the live community not a screenshot)
Click here to open in main browser window

REFERENCES

NOTE:1637766.1 - How To Recompile config.c / Relink Executables Of A Grid Infrastructure Home (Cluster)
NOTE:1931142.1 - How to check and fix file permissions on Grid Infrastructure environment
https://docs.oracle.com/database/121/CWLIN/rem_orcl.htm#CWLIN495
https://docs.oracle.com/database/121/AXDBI/oraclerestart.htm#AXDBI7724
https://docs.oracle.com/database/121/CWLIN/rem_orcl.htm#CWLIN348
http://docs.oracle.com/database/122/CWLIN/relinking-oracle-grid-infrastructure-for-a-cluster-binaries.htm#CWLIN-GUID-11A2832B-A1F1-4454-888F-0CF1CF45EB16
https://docs.oracle.com/database/122/AXDBI/modifying-oracle-grid-infrastructure-for-a-standalone-server-binaries-after-installation.htm#AXDBI-GUID-3A0164E9-8814-4137-808F-CCF5DA32DD26

NOTE:1355977.1 - Steps To Shutdown(stop)/Startup(start) CRS, OHAS, ASM, RDBMS & ACFS Services on a RAC Cluster 11.2 & 12.1 Configuration
NOTE:1422517.1 - Reconfiguring & Recreating The 11gR2/12cR1 Restart/OHAS/SIHA Stack Configuration (Standalone) / How to Reconfigure Oracle Restart

No comments:

Post a Comment

Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)

  Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...