Oracle software Relink



Recently I upgraded the OS from RHEL 5.6 to 5.9.

In our environment we have,

> Database 11gR2 (ASM configured and Gird configured for standalone server)
> Oracle WebLogic Server 10.3.6.
> Oracle Portal, Forms, Reports, and Discoverer Software 11gR1.

After OS upgradation I performed following task in application and database part,

1. Database part:

High level steps:

> Stop the OHAS stack.
> Connect as root user (different session) and unlock the Oracle Grid Infrastructure Standalone installation.
> Relink the Oracle Grid Infrastructure Standalone installation.
> Connect as root user (different session) and lock back the Oracle Grid Infrastructure Standalone installation.
> Relink the Oracle Software Home
> Verify that the all the OHAS services

Stop the OHAS stack (as “grid” OS user):

[grid@test1 ~]$ id

uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1200(dba),1300(asmdba),1301(asmoper)

[grid@test1 ~]$ . oraenv

ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/grid

[grid@test1 ~]$ crsctl stop has

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


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

 [grid@test1 ~]$ su - root

Password:

[root@test1 ~]# id

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

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

[root@test1 ~]# $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

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

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@test1 ~]$ 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@test1 ~]$ mv $ORACLE_HOME/rdbms/lib/config.o $ORACLE_HOME/rdbms/lib/config.o_BAK

[grid@test1 ~]$ 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

Then relink the the Oracle Grid Infrastructure Standalone installation:

[grid@test1 ~]$ script /tmp/relink_gi.txt

Script started, file is /tmp/relink_gi.txt


[grid@test1 ~]$ id

uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1200(dba),1300(asmdba),1301(asmoper)

[grid@test1 ~]$ 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@test1 ~]$ $ORACLE_HOME/bin/relink all

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

[grid@test1 ~]$ exit

exit
Script done, file is /tmp/relink_gi.txt

[grid@test1 ~]$


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


[grid@test1 ~]$ su - root

Password:

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

[root@test1 ~]# $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.


Relink the Oracle Software Home:


[oracle@test1 ~]# . $ORACLE_HOME/bin/oraenv
ORACLE_SID = [root] ? test
The Oracle base has been set to /u01/app/db

[oracle@test1 ~]# $ORACLE_HOME/bin/relink all



Verify that the all the OHAS services (ASM instance, diskgroups, listeners, DB instances, etc.) started:

[oracle@test1 ~]# srvctl start database -d test

[root@test1 ~]# crsctl stat res -t

--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       test1                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       test1                                      
ora.asm
               ONLINE  ONLINE       test1                    Started            
ora.ons
               OFFLINE OFFLINE      test1                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       test1                                      
ora.diskmon
      1        OFFLINE OFFLINE                                                  
ora.evmd
      1        ONLINE  ONLINE       test1                                      
ora.test.db
      1        ONLINE  ONLINE       test1                    Open  


2. Application Part:

No need to perform any special task. (Even I crosschecked with Oracle support also)

5 comments:

  1. Nice Post..More Usefull...

    http://www.appstier.blogspot.in/

    ReplyDelete
  2. I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me. PHP Development Company

    ReplyDelete
  3. Very useful info. Hope to see more posts soon!. book me today

    ReplyDelete
  4. Thanks for the post and great tips..even I also think that hard work is the most important aspect of getting success.. bookmetoday.com

    ReplyDelete