Hi, In this topic we will upgrade RAC from 12.1.0.2 to 19.12
================================================================================================================
https://infraxpertzz.com/step-by-step-upgrade-oracle-rac-grid-infrastructure-and-database-from-12c-to-19c/
https://docs.rackspace.com/blog/upgrade-oracle-grid-from-12c-to-19c/
https://my-orcl.blogspot.com/2021/09/installation-guide-for-rac-12102-on.html
https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html
Oracle Database 19c Release Update & Release Update Revision July 2021 Known Issues (Doc ID 19202107.9)
===================================================
enable NAT and download 19c packages
grep dns /etc/NetworkManager/NetworkManager.conf
if required make reboot
vi /etc/NetworkManager/NetworkManager.conf
**********************
[main]
dns=none
#plugins=ifcfg-rh,ibft
**********************
service network restart
ping www.google.com
yum
install -y oracle-database-preinstall-19c
[root@rac1 ~]# rpm -qa oracle-*
oracle-logos-70.7.0-1.0.7.el7.noarch
oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64
oracle-database-preinstall-19c-1.0-3.el7.x86_64
[root@rac1 ~]#
After 19C Pre-install completes restore adapter to hostonly & check DNS
updated reslove.conf back for dns:
cat /etc/resolve.conf
search dell.com
nameserver 192.168.1.11
options attempts:2
options timeout:1
iscsiadm -m discovery -t st -p 192.168.1.40
systemctl restart iscsi
oracleasm scandisks
oracleasm listdisks
ls -ltr /dev/oracleasm/disks
nslookup dellc-scan
nslookup rac1
nslookup rac2
systemctl status named
systemctl restart named
pwd
===================================================
Step 1:
Upgrade OPatch Version on all nodes RAC 1 and RAC 2:
########################################################
-- update OPatch in GRID_HOME & RDBMS_HOME in (RAC1, RAC2)
[root@rac2 ~]# $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.1.0.1.3
OPatch succeeded.
[root@rac2 ~]#
---- OPATCH update for GRID Home with root user
[root@rac1 ~]# .
dell.env
[root@rac1 ~]# mv $ORACLE_HOME/OPatch
$ORACLE_HOME/OPatch_bkp
[root@rac1 ~]# unzip
/u01/sftwr/p6880880_121010_Linux-x86-64.zip -d $ORACLE_HOME
[root@rac1 ~]# chown
-R grid:oinstall OPatch
[root@rac1 ~]# chmod
-R 775 OPatch
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatch
version
OPatch Version: 12.2.0.1.27
OPatch succeeded.
[root@rac1 ~]#
- Repeat same steps on all noses to update GRID
HOME OPATCH Version
- Crosscheck OPatch Directory with OPatch_bkp i.e Permission is set properly or NOT
- # chown -R grid:oinstall OPatch
- # chmod -R 775 OPatch
drwxr-xr-x 7 grid oinstall 4096 Sep 19 20:56 OPatch_bkp
drwxr-x--- 15 grid oinstall 4096 Jul 30 17:36 OPatch
-----------------------------------
--OPATCH update for Database Home
[root@rac1 28553832]# su
- oracle
Last login: Sat Oct 9 12:02:10 +03 2021
[oracle@rac1 ~]$ .
dell.env
[oracle@rac1 ~]$ mv $ORACLE_HOME/OPatch
$ORACLE_HOME/OPatch_bkp
[oracle@rac1 ~]$ unzip
/u01/sftwr/p6880880_121010_Linux-x86-64.zip -d $ORACLE_HOME
- Repeat same steps on all nodes to update RDBMS
HOME OPATCH Version
- Crosscheck OPatch Directory with OPatch_bkp i.e Permission is set properly or NOT
------------------------------------------------------------
NOTE: for below mandatory patch -- The opatch should always be unzip using grid/oracle user the owner of the $ORACLE_HOME other wise it will
fail with unable to copy files from <patch dir> to $ORACLE_HOME.......
C. The patch is stored in a shared NFS location and there is a permission issue accessing the patch
The workaround is to move the patch to a local filesystem and unzip the patch with grid user, retry opatch auto
D. The patch is not unzipped as grid user, often it is unzipped as root user
ls -l <PATCH_UNZIPPED_PATH> will show the files are owned by root user.
The solution is to unzip the patch as grid user into an empty directory outside of GRID_HOME, then retry the patch apply.
Step 2: Apply patch 28553832 individually on all
Nodes with Root User and use opatchauto:
run analyze before applying patch so patch applied with in 5 mins only
########################################################
#--before execution anylze make sure new OPATCH applied to Grid as well as RDBMS or else it gives error (opatchauto failed with error code 42)
------------------------
-- Make sure before running opatchauto command all the CRS services on all nodes must be UP and running
-- Unzip patch 28553832 with Grid User
-- Run Analyze in new session
watch -n 1 'crsctl check cluster -all'
[grid@rac1 sftwr]$ unzip
p28553832_12102190115forOCW_Linux-x86-64.zip
[grid@rac1 sftwr]$ ls -ltr
total 3042268
drwxr-xr-x 4 grid oinstall 95 Feb 11 2019 28553832
-rwxr-xr-x 1 grid oinstall 396536622 Oct 9 11:40 p28553832_12102190115forOCW_Linux-x86-64.zip
[root@rac1 ~]# .
dell.env
[root@rac1 ~]# export
PATH=$PATH:$ORACLE_HOME/OPatch
[root@rac1 ~]# opatchauto
apply /u01/sftwr/28553832 -analyze
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /u01/sftwr/28553832/28553832
Log: /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-09_12-06-26PM_1.log
OPatchauto session completed at Sat Oct 9 12:06:29 2021
Time taken to complete the session 0 minute, 56 seconds
[root@rac1 ~]#
------------------------
[root@rac1 ~]# opatchauto
apply /u01/sftwr/28553832 -oh /u01/app/grid_home -ocmrf
/u01/app/grid_home/OPatch/ocm/bin/emocmrsp
------------------------
-- To check applied patches
[grid@rac1 ~]$ .
dell.env
[grid@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
lsinventory |grep -i 28553832
Patch 28553832 : applied on Sat Oct 09 12:14:02 AST 2021
Patch description: "OCW Interim patch for 28553832"
21976167, 21694632, 23095976, 20115586, 28553832, 20883009, 19164099
[grid@rac1 ~]$
[grid@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
lsinventory |grep -i 21255373
19368917, 21255373, 22393909, 25206650, 25164540, 20579351, 20408163
[grid@rac1 ~]$
#--Repeat same steps at node 2 to apply patch
28553832
==================================================
If opatchauto fails due to any reason reset patching utility with below commands
So, it’s most likely some patch completed wrongly. Here is the quick fix:
$ORACLE_HOME/bin/clscfg -patch
[root@rac2 ~]# $ORACLE_HOME/bin/clscfg
-patch
clscfg: -patch mode specified
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 1.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
[root@rac2 ~]# $ORACLE_HOME/bin/crsctl
stop rollingpatch
CRS-1171: Rejecting rolling patch mode change because the patch level is not consistent across all nodes in the cluster. The patch level on nodes rac1 is not the same as the patch level [0] found on nodes rac2.
CRS-4000: Command Stop failed, or completed with errors.
[root@rac2 ~]#
STEP 3: UPGRADING GRID from 12.1.2 to 19.3.0
########################################################
#-- Make sure you install cvuqdisk from 19C
#-- Make Sure you made yum install 19c prechecks before proceeding.
yum install -y oracle-database-preinstall-19c
------------------------------------------------------
[root@rac1 ~]# chmod -R 775 /u01/app/
[root@rac1 ~]# su
- grid
Last login: Fri Oct 8 20:38:44 +03 2021 on pts/0
[grid@rac1 ~]$ mkdir
-p /u01/app/19_grid_home
[grid@rac2 ~]$ mkdir -p /u01/app/19_grid_home
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ unzip
/u01/sftwr/LINUX.X64_193000_grid_home.zip -d /u01/app/19_grid_home/
watch -n 1 'crsctl check cluster -all'
watch -n 1 'srvctl status database -d dell'
crsctl stat res -t -init
srvctl status database -d dell
Instance DELL1 is not running on node rac1
Instance DELL2 is not running on node rac2
[root@rac2 ~]# crsctl
check cluster -all
**************************************************************
rac1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
rac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
------------------------------------------------------------
[root@rac1 rpm]# ls -ltr
-rw-r--r-- 1 grid oinstall 11412 Mar 13 2019 cvuqdisk-1.0.10-1.rpm
[root@rac1 rpm]# pwd
/u01/app/19_grid_home/cv/rpm
[root@rac1 rpm]# rpm -qa cvuqdisk
cvuqdisk-1.0.9-1.x86_64
[root@rac1 rpm]#
[root@rac1 rpm]# export
CVUQDISK_GRP=oinstall
[root@rac2 rpm]# rpm
-ivh cvuqdisk-1.0.10-1.rpm --nodeps --force
Preparing... ################################# [100%]
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]
[root@rac2 sftwr]#
[root@rac2 sftwr]# rpm -qa cvuqdisk
cvuqdisk-1.0.10-1.x86_64
[root@rac2 sftwr]#
[grid@rac1 19_grid_home]$ ./runcluvfy.sh
stage -pre crsinst -upgrade -rolling -src_crshome /u01/app/grid_home
-dest_crshome /u01/app/19_grid_home -dest_version 19.0.0.0.0 -fixup -verbose
[root@rac1 sftwr]# /tmp/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.
[root@rac2 sftwr]#
===========================================================================================
complete execution of gridSteup.sh approx time is 1Hr 50 Mins with 4GB RAM and and processor
#-- Root.sh script log (Executing upgrade step 19 of 19)
===========================================================================================
Steps: Install Grid Software
unset
ORACLE_BASE
unset
ORACLE_HOME
unset
ORACLE_SID
cd
/u01/app/19_grid_home/
[root@rac1 ~]# systemctl
status named
[root@rac2 ~]# systemctl
status named
[grid@rac1 19_grid_home]$ ./gridSetup.sh
==================================================================
[root@rac1 ~]# grep
grid dell.env
#export ORACLE_HOME=/u01/app/grid_home
export ORACLE_HOME=/u01/app/19_grid_home
crsctl
query crs releasepatch
crsctl query crs releaseversion
crsctl stat res -t
crsctl query crs softwareversion -all
crsctl query crs activeversion -f
---- with grid user we cannot check srvctl but with root it works
[grid@rac2 ~]$ srvctl status database -d dell
PRCD-1229 : An attempt to access configuration of database dell was rejected because its version 12.1.0.2.0 differs from the program version 19.0.0.0.0. Instead run the program from /u01/app/oracle/product/12.1.0/dbhome_1.
[grid@rac2 ~]$
[root@rac2 app]# srvctl status database -d dell
Instance DELL1 is not running on node rac1
Instance DELL2 is not running on node rac2
[root@rac2 app]#
[grid@rac1 ~]$ cat dell.env
#export ORACLE_HOME=/u01/app/grid_home
export ORACLE_HOME=/u01/app/19_grid_home
export PATH=$ORACLE_HOME/bin:$PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_SID=+ASM1
[grid@rac1 ~]$
[grid@rac1 ~]$ . dell.env
[grid@rac1 ~]$ sqlplus
/ as sysasm
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 8 10:20:52 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
==================================================================
------------------------
#-- creation of sample table in u1 schema:
grant connect, resource to u1 identified by u1;
alter user u1 quota unlimited on USERS;
conn u1/u1
create table emp (EName varchar(15), ENo number);
insert into emp (EName, ENo) values ('aaa',10);
insert into emp (EName, ENo) values ('bbb',20);
insert into emp (EName, ENo) values ('ccc',30);
commit;
select * from emp;
show user;
STEP 4: upgrade GRID HOME from 19.3 to 19.12
###########################################
#-- unzip patch 19.12 with grid User
------------------------------------------------------
[grid@rac1 sftwr]$ unzip
p32895426_190000_Linux-x86-64.zip
========================================================
Upgrading Opatch for 19C Grid Home on RAC1, RAC2
========================================================
1.2.1.1 OPatch Utility Information
You must use the OPatch utility version 12.2.0.1.25
[root@rac1 ~]# .
dell.env
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatch
version
OPatch Version: 12.2.0.1.17
OPatch succeeded.
[root@rac1 ~]#
[root@rac1 ~]# mv
$ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_bkp
[root@rac1 ~]# unzip
/u01/sftwr/p6880880_121010_Linux-x86-64.zip -d /u01/app/19_grid_home/
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatch
version
OPatch Version: 12.2.0.1.27
OPatch succeeded.
[root@rac1 ~]#
[root@rac1 ~]# chown
-R grid:oinstall $ORACLE_HOME/OPatch
[root@rac1 ~]# chmod
-R 775 $ORACLE_HOME/OPatch
[root@rac1 ~]#
#-- update OPatch in RAC2 Grid 19C home
========================================================
========================================================
Check Patch 32895426 conflicts on rac1 before without
$PATH
========================================================
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/sftwr/32895426/32904851
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/sftwr/32895426/32916816
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/sftwr/32895426/32915586
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/sftwr/32895426/32918050
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/sftwr/32895426/32585572
pwd
[grid@rac1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32904851
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2021, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/19_grid_home
Central Inventory : /u01/app/oraInventory
from : /u01/app/19_grid_home/oraInst.loc
OPatch version : 12.2.0.1.17
OUI version : 12.2.0.7.0
Log file location : /u01/app/19_grid_home/cfgtoollogs/opatch/opatch2021-10-08_10-46-02AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32916816
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2021, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/19_grid_home
Central Inventory : /u01/app/oraInventory
from : /u01/app/19_grid_home/oraInst.loc
OPatch version : 12.2.0.1.17
OUI version : 12.2.0.7.0
Log file location : /u01/app/19_grid_home/cfgtoollogs/opatch/opatch2021-10-08_10-46-23AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac1 ~]$
========================================================
Run analyze for 19.12 GRID Upgrade Patch 32895426 on
rac1 before without $PATH
========================================================
1.2.2 One-off Patch Conflict Detection and Resolution
$ORACLE_HOME/OPatch/opatchauto apply /u01/sftwr/32895426 -analyze
[root@rac1 ~]# export ORACLE_HOME=/u01/app/19_grid_home
[root@rac1 ~]# grep PATH ~/*.env
#export PATH=$ORACLE_HOME/bin:$PATH
[root@rac1 ~]#
[root@rac1 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@rac1 ~]#
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatchauto
apply /u01/sftwr/32895426 -analyze
OPatchauto session is initiated at Fri Oct 8 10:57:55 2021
System initialization log file is /u01/app/19_grid_home/cfgtoollogs/opatchautodb/systemconfig2021-10-08_10-58-03AM.log.
Session log file is /u01/app/19_grid_home/cfgtoollogs/opatchauto/opatchauto2021-10-08_10-58-59AM.log
The id for this session is 14W4
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19_grid_home
Patch applicability verified successfully on home /u01/app/19_grid_home
Executing patch validation checks on home /u01/app/19_grid_home
Patch validation checks successfully completed on home /u01/app/19_grid_home
OPatchAuto successful.
--------------------------------Summary--------------------------------
Analysis for applying patches has completed successfully:
Host:rac1
CRS Home:/u01/app/19_grid_home
Version:19.0.0.0.0
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /u01/sftwr/32895426/32916816
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_10-59-46AM_1.log
Patch: /u01/sftwr/32895426/32915586
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_10-59-46AM_1.log
Patch: /u01/sftwr/32895426/32585572
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_10-59-46AM_1.log
Patch: /u01/sftwr/32895426/32918050
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_10-59-46AM_1.log
Patch: /u01/sftwr/32895426/32904851
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_10-59-46AM_1.log
Following homes are skipped during patching as patches are not applicable:
/u01/app/oracle/product/12.1.0/dbhome_1
OPatchauto session completed at Fri Oct 8 11:01:25 2021
Time taken to complete the session 3 minutes, 30 seconds
[root@rac1 ~]#
========================================================
completed in 4 Mins Run analyze for 19.12 GRID Upgrade Patch 32895426 on rac1 before without $PATH
========================================================
------------------------------------------------------------
========================================================
Run 19.12 GRID Upgrade Patch 32895426 on rac1 before
set $PATH
Also verify how many homes are registered with in Global & local inventory.
cat /etc/oraInst.loc
cat /u01/app/grid_home/oraInst.loc
========================================================
1.2.4 opatchauto ----approx time 25Mins with 4GB Ram and 1 process on node2 with/without running analyze took 60 Mins
The utility can be run in parallel on the cluster nodes except for the first (any) node.
[root@rac1 ~]# export ORACLE_HOME=/u01/app/19_grid_home
[root@rac1 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@rac1 ~]# export
PATH=$PATH:$ORACLE_HOME/OPatch
[root@rac1 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/u01/app/19_grid_home/OPatch
[root@rac1 ~]#
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatchauto
apply /u01/sftwr/32895426 -oh /u01/app/19_grid_home
OPatchauto session is initiated at Fri Oct 8 11:05:38 2021
System initialization log file is /u01/app/19_grid_home/cfgtoollogs/opatchautodb/systemconfig2021-10-08_11-05-47AM.log.
Session log file is /u01/app/19_grid_home/cfgtoollogs/opatchauto/opatchauto2021-10-08_11-06-06AM.log
The id for this session is BEV4
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19_grid_home
Patch applicability verified successfully on home /u01/app/19_grid_home
Executing patch validation checks on home /u01/app/19_grid_home
Patch validation checks successfully completed on home /u01/app/19_grid_home
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19_grid_home
Prepatch operation log file location: /u01/app/grid/crsdata/rac1/crsconfig/crs_prepatch_apply_inplace_rac1_2021-10-08_11-07-58AM.log
CRS service brought down successfully on home /u01/app/19_grid_home
Start applying binary patch on home /u01/app/19_grid_home
Binary patch applied successfully on home /u01/app/19_grid_home
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19_grid_home
Postpatch operation log file location: /u01/app/grid/crsdata/rac1/crsconfig/crs_postpatch_apply_inplace_rac1_2021-10-08_11-21-54AM.log
CRS service started successfully on home /u01/app/19_grid_home
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:rac1
CRS Home:/u01/app/19_grid_home
Version:19.0.0.0.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /u01/sftwr/32895426/32585572
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_11-11-51AM_1.log
Patch: /u01/sftwr/32895426/32904851
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_11-11-51AM_1.log
Patch: /u01/sftwr/32895426/32915586
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_11-11-51AM_1.log
Patch: /u01/sftwr/32895426/32916816
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_11-11-51AM_1.log
Patch: /u01/sftwr/32895426/32918050
Log: /u01/app/19_grid_home/cfgtoollogs/opatchauto/core/opatch/opatch2021-10-08_11-11-51AM_1.log
OPatchauto session completed at Fri Oct 8 11:30:33 2021
Time taken to complete the session 24 minutes, 56 seconds
[root@rac1 ~]#
========================================================
Completed in 25 Mins: Run 19.12 GRID Upgrade Patch 32895426 on rac1 before set $PATH
========================================================
#-- Validate 19.12 Grid Home patches Status form
lsinventory
[root@rac1 ~]# . dell.env
[root@rac1 ~]# su - grid
Last login: Fri Oct 8 11:36:53 +03 2021
[grid@rac1 ~]$ . dell.env
crsctl
query crs releasepatch
crsctl query crs releaseversion
crsctl stat res -t
crsctl query crs softwareversion -all
crsctl query crs activeversion -f
[grid@rac1 ~]$ crsctl query crs releasepatch
Oracle Clusterware release patch level is [3998055650] and the complete list of patches [32585572 32904851 32915586 32916816 32918050 ] have been applied on the local node. The release patch string is [19.12.0.0.0].
[grid@rac1 ~]$
[grid@rac1 ~]$ sqlplus
/ as sysasm
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 8 11:38:51 2021
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
[grid@rac1 ~]$
-----------------------------------------------------------------
all the patches listed in patch folder of GRID-19.12 (32895426) are applied to GRID HOME can be checked with grid user
[grid@rac1 ~]$
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32895426
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32918050
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32916816
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32915586
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32904851
$ORACLE_HOME/OPatch/opatch lsinventory | grep 32585572
pwd
#-- Repeate same on node 2
1. Run analyze patch
2. Apply patch with correct $PATH
3. If got any problem in applying grid upgrade patch due to additional registered homes in Global inventory then take backup an remove unwanted home like 12.1.0.2 (EBS Home)
STEP 5: Database (RDBMS) upgrade from 12.1 to
19.3-->19.12
####################################################
- unzip 19.3 home with ORACLE User
- make 19.3 home directory on node 2 with oracle user
------------------------------------------------------
SQL> select
count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
0
SQL>
[oracle@rac1 ~]$ mkdir
-p /u01/app/oracle/product/19.0.0/dbhome_1
[oracle@rac2 ~]$ mkdir
-p /u01/app/oracle/product/19.0.0/dbhome_1
[oracle@rac1 ~]$ unzip
/u01/sftwr/LINUX.X64_193000_db_home.zip -d
/u01/app/oracle/product/19.0.0/dbhome_1/
[oracle@rac1 ~]$ cat dell.env
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib; export LD_LIBRARY_PATH
export ORACLE_SID=DELL1
[oracle@rac1 ~]$ .
dell.env
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl
stop database -d dell
[oracle@rac1 ~]$ srvctl status database -d dell
Instance DELL1 is not running on node rac1
Instance DELL2 is not running on node rac2
[oracle@rac1 ~]$ cd
/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@rac1 dbhome_1]$ ./runInstaller (approx time 26Mins with 4GB RAM and 1 processor)
#################################################################
APEX Upgrade Can Be ignored
APEX upgrade sesion got dissconeccted after running for 45 mins so created some invalid objects
-----------------------------------
SQL> SELECT VERSION, STATUS, SCHEMA FROM DBA_REGISTRY WHERE COMP_ID = 'APEX';
VERSION STATUS
------------------------------ --------------------------------------------
SCHEMA
--------------------------------------------------------------------------------
4.2.5.00.08 VALID
APEX_040200
SQL>
[oracle@rac1 dbhome_1]$ mv apex apex_old
[oracle@rac1 dbhome_1]$ unzip -q /u01/sftwr/apex_18.2_en.zip
[oracle@rac1 dbhome_1]$ cd apex
[oracle@rac1 apex]$ ls -ltr
[oracle@rac1 apex]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 8 15:40:38 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/
#################################################################
SQL> show user
USER is "SYS"
SQL>
SQL> select
count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
1
SQL>
SSTEP 6: After Run install finish run dbua (approx time 1hr 45Mins for dbua with 4GB RAM and 1 processor)
#################################################################
[oracle@rac1 bin]$ pwd
/u01/app/oracle/product/19.0.0/dbhome_1/bin
[oracle@rac1 bin]$ ./dbua
[oracle@rac1 ~]$ sqlplus
/ as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 8 18:09:48 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select
* from v$version;
BANNER
--------------------------------------------------------------------------------
BANNER_FULL
----------------------------------------------------------------------------------------------------------------------------------------------------------------
BANNER_LEGACY CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production 0
SQL>
SQL> select
count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
0
SQL>
set linesize 200;
col COMP_ID for a15;
col COMP_NAME for a50;
select comp_id,comp_name,version,status
from dba_registry;COMP_ID COMP_NAME VERSION STATUS
--------------- -------------------------------------------------- ------------------------------ --------------------------------------------
CATALOG Oracle Database Catalog Views 19.0.0.0.0 VALID
CATPROC Oracle Database Packages and Types 19.0.0.0.0 VALID
JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0 VALID
XML Oracle XDK 19.0.0.0.0 VALID
CATJAVA Oracle Database Java Packages 19.0.0.0.0 VALID
APS OLAP Analytic Workspace 19.0.0.0.0 VALID
RAC Oracle Real Application Clusters 19.0.0.0.0 VALID
XDB Oracle XML Database 19.0.0.0.0 VALID
OWM Oracle Workspace Manager 19.0.0.0.0 VALID
CONTEXT Oracle Text 19.0.0.0.0 VALID
ORDIM Oracle Multimedia 19.0.0.0.0 VALID
COMP_ID COMP_NAME VERSION STATUS
--------------- -------------------------------------------------- ------------------------------ --------------------------------------------
SDO Spatial 19.0.0.0.0 VALID
XOQ Oracle OLAP API 19.0.0.0.0 VALID
OLS Oracle Label Security 19.0.0.0.0 VALID
APEX Oracle Application Express 4.2.5.00.08 UPGRADING
DV Oracle Database Vault 19.0.0.0.0 VALID
16 rows selected.
SQL>
SQL> select
description from dba_registry_sqlpatch;
DESCRIPTION
--------------------------------------------------------------------------------
Database Release Update : 19.3.0.0.190416 (29517242)
SQL>
[root@rac1 ~]# srvctl
status database -d dell
Instance DELL1 is running on node rac1
Instance DELL2 is running on node rac2
[root@rac1 ~]#
[root@rac1 ~]# srvctl status database -d dell
Instance DELL1 is running on node rac1
Instance DELL2 is running on node rac2
[root@rac1 ~]# srvctl config all
Oracle Clusterware configuration details
========================================
Oracle Clusterware basic information
------------------------------------
Operating system Linux
Name dellc
Class STANDALONE
Cluster nodes rac1, rac2
Version 19.0.0.0.0
[root@rac1 ~]# srvctl config database -d dell
Database unique name: DELL
Database name: DELL
Oracle home: /u01/app/oracle/product/19.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/DELL/PARAMETERFILE/spfileDELL.ora
Password file: +DATA/DELL/PASSWORD/pwddell.276.1083756719
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: oinstall
Database instances: DELL1,DELL2
Configured nodes: rac1,rac2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[root@rac1 ~]#
[root@rac1 ~]# export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[root@rac1 ~]# export PATH=$PATH:$ORACLE_HOME/OPatch
[root@rac1 ~]# echo $PATH
/u01/app/19_grid_home/bin:/u01/app/19_grid_home/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/u01/app/19_grid_home/OPatch
[root@rac1 ~]#
STEP 7: Database (RDBMS) upgrade from 19.3 to
19.12
####################################################
apply corresponding OJVM as per applying PSU as per PSU Patch README
3.1.1 Applying Database 19.x Updates/Revisions with Oracle JavaVM 19.x Updates
Oracle Database 19c Proactive Patch Information (Doc ID 2521164.1)
---------------
======================================================================
#-- Upgrade OPatch of 19.3 RDBMS HOME in both Rac1, RAC2
[oracle@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
version
OPatch Version: 12.2.0.1.17
OPatch succeeded.
[oracle@rac1 ~]$
[oracle@rac1 ~]$ mv
$ORACLE_HOME/OPatch $ORACLE_HOME/OPatc_bkp
[oracle@rac1 ~]$ unzip
/u01/sftwr/p6880880_121010_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
version
OPatch Version: 12.2.0.1.27
OPatch succeeded.
[oracle@rac1 ~]$
#-- update OPatch for 19.3 RDBMS in RAC2 also
======================================================================
unable to execute analyze from RDBMS #GRID_HOME/OPatch/opatchauto apply /u01/sftwr/32895426 -analyze
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32904851
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32916816
======================================================================
========================================================
Run check conflicts for 19.12 RDBMS Upgrade Patch
32895426 on rac1 without set $PATH
========================================================
[oracle@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32904851
Oracle Interim Patch Installer version 12.2.0.1.27
Copyright (c) 2021, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.27
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-10-08_19-20-53PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[oracle@rac1 ~]$
---- check patch confilict with opatch command
cd 32904851
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
[oracle@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/sftwr/32895426/32916816
========================================================
Completed in ..... Mins: Run check conflicts for 19.12 RDBMS Upgrade Patch 32895426 on rac1 without set $PATH
========================================================
========================================================
Run 19.12 RDBMS Upgrade Patch 32895426 on rac1 with
root user before set $PATH
========================================================
analyze will not work for 19.12 RDBMS Upgrade Patch 32895426 by setting RDBMS HOME
[root@rac1 ~]# export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[root@rac1 ~]# echo $ORACLE_HOME
/u01/app/oracle/product/19.0.0/dbhome_1
[root@rac1 ~]#
[root@rac1 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@rac1 ~]#
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatchauto apply /u01/sftwr/32895426 -analyze
opatchauto must run from Grid Home with current arguments. Please retry it inside Grid Home
opatchauto returns with error code = 2
[root@rac1 ~]#
Apply 19.12 RDBMS Upgrade Patch 32895426 on rac1 before with $PATH
[root@rac1 ~]# export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[root@rac1 ~]# export PATH=$PATH:$ORACLE_HOME/OPatch
[root@rac1 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch
[root@rac1 ~]#
[root@rac1 ~]# $ORACLE_HOME/OPatch/opatchauto
apply /u01/sftwr/32895426 -oh /u01/app/oracle/product/19.0.0/dbhome_1
[root@rac1 ~]# su
- oracle
Last login: Fri Oct 8 19:09:10 +03 2021 on pts/0
[oracle@rac1 ~]$ .
dell.env
[oracle@rac1 ~]$ $ORACLE_HOME/OPatch/opatch
lsinventory |grep description
Patch description: "Database Release Update : 19.12.0.0.210720 (32904851)"
Patch description: "OCW Release Update : 19.12.0.0.210720 (32916816)"
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus
/ as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 8 19:12:53 2021
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
SQL> select
* from v$version;
BANNER
--------------------------------------------------------------------------------
BANNER_FULL
--------------------------------------------------------------------------------
BANNER_LEGACY
--------------------------------------------------------------------------------
CON_ID
----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
0
BANNER
--------------------------------------------------------------------------------
BANNER_FULL
--------------------------------------------------------------------------------
BANNER_LEGACY
--------------------------------------------------------------------------------
CON_ID
----------
SQL>
SQL> select
description from dba_registry_sqlpatch;
no rows selected
SQL>
#-- Repeat same steps for node 2 and then run datapatch from note README_32904851.html of database directory
STEP 8: Apply corresponding OJVM for the applied PSU
Release Schedule of Current Database Releases (Doc ID 742060.1)
Primary Note for Database Proactive Patch Program (Doc ID 888.1)
Database 11.2.0.4 Proactive Patch Information (Doc ID 2285559.1)
Database 12.1.0.2 Proactive Patch Information (Doc ID 2285558.1)
Database 18 Proactive Patch Information (Doc ID 2369376.1)
Oracle Database 19c Proactive Patch Information (Doc ID 2521164.1)
Oracle Database 21c Proactive Patch Information (Doc ID 2796590.1)
Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU and Update" (OJVM PSU and OJVM Update) Patches (Doc ID 1929745.1)
SELECT version, status FROM dba_registry WHERE comp_id='JAVAVM';
###############################################################################################################
Known issued in applying 19.18 RDBMS PSU on database home available in other blog link below
Thanks for Reading
Regards,
Mohammed Areefuddin.
Suggested Topics :
Linux | DATABASE | RMAN | RAC | EBS |
R1229 M7 Clone | ||||
RAC DataGuard | Pluggable DB Clone | |||
appsutil for DB | ||||
JDK JRE upgrade | ||||
Add EBS Node | ||||