HOME > > Upgrade Clusterware & Database from 12cR1 to 12cR2

Upgrade Clusterware & Database from 12cR1 to 12cR2

Anup - Friday, February 24, 2023



 Download Grid Software 



Check GRID Infrastructure software version and Clusterware status:


cd $CRS_HOME/bin


bash-3.2$ ./crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [12.1.0.2.0]


bash-3.2$ ./crsctl check crs


CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online


bash-3.2$ ./crs_stat -t



Check Database status and configuration :

bash-3.2$ ./srvctl status database -d PROD

Instance PROD1 is running on node racnode1

Instance PROD2 is running on node racnode2


bash-3.2$ ./srvctl config database -d PROD



Perform local backup of OCR 


[root@racpb1 ~]# cd $GRID_HOME/bin/

[root@racpb1 bin]# ./ocrconfig -export /home/oracle/ocrfile_bkp_121


Move the 12cR2 GRID Software to the server and unzip the software :


 

unzip V840012-01_GRID.zip -d /oracle/grid/12cr2


Run cluvfy utility to pre-check  any errors :


cd /oracle/grid/12cr2

./runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome /oracle/grid/12cr1 -dest_crshome /oracle/grid/12cr2 -dest_version 12.2.0.1.0 -verbose


Validate the result and work on missing component


Need to Apply patch 21255373


  • Download Latest OPatch 6880880 

  • Move OPatch director from GI and Db Home on all rac node

  • Copy Latest OPatch utility to GI and DB Home on all rac node


First Apply patch on First Node


  • Run the pre root script as root user in GI Home
    <GI_HOME>/crs/install/rootcrs.sh -prepatch

  • Apply the GI patch using as GI user

./opatch apply -oh /oracle/grid/12cr1 -local /home/oracle/12c/21255373/21255373

  • Apply the DB patch using as oracle user
    As the database home owner execute:
    ./opatch apply -oh /oracle/db/12cr1 -local /home/oracle/12c/21255373/21255373

  • Run the post script as root user
    # <GI_HOME>/rdbms/install/rootadd_rdbms.sh
    # <GI_HOME>/crs/install/rootcrs.sh -postpatch

Now Perform above steps for Second node

Run the datapatch Utility

SQL> Connect / as sysdba

startup

% cd $ORACLE_HOME/OPatch

./datapatch -verbose



Agian Run cluvfy utility to pre-check  any errors :


cd /oracle/grid/12cr2

./runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome /oracle/grid/12cr1 -dest_crshome /oracle/grid/12cr2 -dest_version 12.2.0.1.0 -verbose


Review the Result:


Issue: 

Verifying Package: cvuqdisk-1.0.10-1 ...FAILED (PRVG-11551)


Solution: Perform on both node


  1. log in as a ROOT user and go to Grid Home

cd /oracle/grid/12cr2/

find ./ -name cvuqdisk*

./cv/rpm/cvuqdisk-1.0.10-1.rpm

./cv/remenv/cvuqdisk-1.0.10-1.rpm


rpm -Uv ./cv/rpm/cvuqdisk-1.0.10-1.rpm

Preparing packages...

cvuqdisk-1.0.10-1.x86_64

cvuqdisk-1.0.9-1.x86_64


rpm -qa | grep cvuqdisk

cvuqdisk-1.0.10-1.x86_64


Issue:

Verifying Disk group ASM compatibility setting ...FAILED

DATA: PRVE-3175 : ASM compatibility for ASM disk group "DATA" is set to

      "11.2.0.0.0", which is less than the minimum supported value "11.2.0.2.0".


OCR: PRVE-3175 : ASM compatibility for ASM disk group "OCR" is set to

     "11.2.0.0.0", which is less than the minimum supported value "11.2.0.2.0".


Solution:


Check the compatibility of a ASM diskgroup


SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat, substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP;


DISKGROUP                      ASM_COMPAT   DB_COMPAT

------------------------------ ------------ ------------

OCR                            11.2.0.0.0   10.1.0.0.0

DATA                           11.2.0.0.0   10.1.0.0.0


Check the ASM attribute


column value for a20

column name for a20

SELECT group_number, name, value FROM v$asm_attribute ORDER BY group_number, name;


 select NAME,VALUE from v$asm_attribute where name like '%com%';


Alter command only used to increased value


ALTER DISKGROUP OCR SET ATTRIBUTE 'compatible.asm' = '11.2.0.2.0';


SQL> alter diskgroup DATA set attribute 'compatible.asm'='11.2.0.2.0';


Diskgroup altered.


SQL> ALTER DISKGROUP DATA SET ATTRIBUTE 'compatible.rdbms' = '11.2.0.2.0';


Diskgroup altered.





Upgrade 12cR2 by executing runInstaller :


How to Apply a Grid Infrastructure Patch Before Grid Infrastructure Configuration (before root.sh or rootupgrade.sh or gridsetup.bat) is Executed (Doc ID 1410202.1)



Update OPatch to latest version 

Make Sure OCR size not less than 35 GB

Download and unzip latest PSU Patch 33583921


go to /oracle/grid/12cr2



To apply only Release Updates:


./gridSetup.sh -applyPSU <PSU_PATC_LOCATION>


./gridSetup.sh -applyPSU /home/oracle/33583921


Log Location : /oracle/grid/12cr2/cfgtoollogs/opatch








Issue:

PRVG-10091 : failed to retrieve the ASM password file location for an ASM instance


Solution:

PRVG-10091 : failed to retrieve the ASM password file location for an ASM instance (Doc ID 2256199.1)



How to recreate shared ASM password file in GI clusterware (Doc ID 1929673.1)

ORA-15221: ASM operation requires compatible.asm of string or higher | Shivananda Rao (shivanandarao-oracle.com)








  • When prompted, run the rootupgrade.sh script on each node in the cluster that you want to upgrade.

  • Run the script on the local node first. 

  • The script shuts down the earlier release installation, replaces it with the new Oracle Clusterware release, and starts the new Oracle Clusterware installation.

After running rootupgrade.sh script,Click the OK button.

Issue: 


  1. rootupgrdae.sh failed 

  2. validate the Log File: $GRID_HOME/cfgtoollogs/crsconfig/rootcrs_xxxx.log

fix the issue and rerun rootupgrade.sh -force


Ignore 

Check the Clusterware upgrade version:


cd /oracle/grid/12cr2/bin/

./crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [12.2.0.1.0]


srvctl status database -d PROD

Instance PROD1 is running on node racnode1

Instance PROD2 is running on node racnode2




Validate the services after CRS upgrade:

./crsctl status resource -t

Then check the status of the clusterware globally as follows:

# crsctl check cluster -all


**************************************************************

racnode1:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

racnode2:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************


Install RAC database from 12cR1 to 12cR2


Download DB Software 


Check the preupgrade status 


cd /home/oracle/12c

./runcluvfy.sh stage -pre dbinst -upgrade -src_dbhome /oracle/db/11g -dest_dbhome /oracle/db/12cr1 -dest_version 12.1.0.2.0


go to the 12cR2 database dump directory 


cd /home/oracle/12c/database


./runInstaller 















Upgrade RAC database



Run the DBUA to start the database upgrade

export ORACLE_HOME=/oracle/db/12cr2

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=PROD1


invoke  —---->> dbua





















Check Database status and configuration :

bash-3.2$ ./srvctl status database -d PROD

Instance PROD1 is running on node racnode1

Instance PROD2 is running on node racnode2


bash-3.2$ ./srvctl config database -d PROD

Instance PROD1 is running on node racnode1

Instance PROD2 is running on node racnode2

[oracle@racnode1 bin]$ ./srvctl config database -d PROD

Database unique name: PROD

Database name: PROD

Oracle home: /oracle/db/12cr1

Oracle user: oracle

Spfile: +DATA/prod/spfileprod.ora

Password file:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATA

Mount point paths:

Services:

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group:

Database instances: PROD1,PROD2

Configured nodes: racnode1,racnode2

Database is administrator managed


./crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.DATA.dg    ora....up.type ONLINE    ONLINE    racnode1

ora....ER.lsnr ora....er.type ONLINE    ONLINE    racnode1

ora....N1.lsnr ora....er.type ONLINE    ONLINE    racnode2

ora....N2.lsnr ora....er.type ONLINE    ONLINE    racnode1

ora....N3.lsnr ora....er.type ONLINE    ONLINE    racnode1

ora.MGMTLSNR   ora....nr.type ONLINE    ONLINE    racnode1

ora.OCR.dg     ora....up.type ONLINE    ONLINE    racnode1

ora.asm        ora.asm.type   ONLINE    ONLINE    racnode1

ora.cvu        ora.cvu.type   ONLINE    ONLINE    racnode2

ora.mgmtdb     ora....db.type ONLINE    ONLINE    racnode1

ora....network ora....rk.type ONLINE    ONLINE    racnode1

ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    racnode2

ora.ons        ora.ons.type   ONLINE    ONLINE    racnode1

ora.prod.db    ora....se.type ONLINE    ONLINE    racnode1

ora....SM1.asm application    ONLINE    ONLINE    racnode1

ora....E1.lsnr application    ONLINE    ONLINE    racnode1

ora....de1.ons application    ONLINE    ONLINE    racnode1

ora....de1.vip ora....t1.type ONLINE    ONLINE    racnode1

ora....SM2.asm application    ONLINE    ONLINE    racnode2

ora....E2.lsnr application    ONLINE    ONLINE    racnode2

ora....de2.ons application    ONLINE    ONLINE    racnode2

ora....de2.vip ora....t1.type ONLINE    ONLINE    racnode2

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    racnode2

ora.scan2.vip  ora....ip.type ONLINE    ONLINE    racnode1

ora.scan3.vip  ora....ip.type ONLINE    ONLINE    racnode1

[oracle@racnode1 bin]$


Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me