Practice - Applying RU Patches On Oracle Restart
Practice - Applying RU Patches On Oracle Restart
Practice
Practice Target
In this practice, you will apply a Release Update (RU) patch on the Oracle database with ASM.
Assumption
The practice assumes that the Oracle database with ASM is available in Oracle VirtualBox. In Oracle
VirtualBox, you named the machine as srv1-asm.
Note: When Oracle Grid Infrastructure is installed with a standalone Oracle database, this
configuration is called Oracle Restart.
The easiest tool to apply patches on Oracle Restart is to use opatchauto utility. This utility automates
applying the patch on both the Grid Infrastructure home and the database home. This obviously
simplifies the procedure to apply patches on an Oracle Restart configuration.
The most important requirement for this utility is to have the GI home and the database home of the
same version.
Also, the user who should invoke this utility is the root user (it is not oracle, nor grid).
The utility does not require to shutdown the database or the grid resources. It automatically shuts
down the services and start them up on the right time.
8. Exit from grid shell so that the current user becomes root
exit
9. Download the GI Release Update 19.16.0.0.220719 from Oracle support or link. Its size is nearly
2.7G. The file name is p34130714_190000_Linux-x86-64.zip
11. In the Putty session, create a staging directory to extract the patch files into it.
mkdir /media/sf_staging/patch
13. Open the README.html file in the patch directory in your favorite browser.
Consider the section "Patch Numbers Installed as Part of this Bundle Patch". Observe the
following:
o The RU is composed of 5 patches. One for the database only, one for both the database and
the grid, and three for grid home only.
o The database RU is the same RU that we applied earlier in the course on the non-ASM
database. This means, after we apply this RU on the database home, there is no need to apply
the same RU again on the database home.
/media/sf_staging/patch/34130714/README.html
Because we have a few patches to apply on the system, lets check if we have free space to apply all
those patches.
16. Run the OPatch command to check if enough free space is available to apply the patches on the
grid home.
If the command passed the check, this means we have enough free space to apply the patches
on the grid home.
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile
/tmp/patch_list_gihome.txt
18. In the README.HTML file, refer to the section "6 Patch Installation". Observe that for the
instructions to apply the patches on an Oracle Restart configuration, it asks to refer to MOS note
2246888.1. In that note, you need to refer to section "Case 4: Patching Oracle Restart
Home".
19. Exit from the current user shell so that the current user becomes the root
exit
20. Add the OPatch path in the GI grid to the PATH variable.
export PATH=$PATH:/u01/app/19.0.0/grid/OPatch
If Opatch fails, it stops with error and saves details about the error in a log file. If this happens to
you, consider performing the following:
a. Look into the log file reported by the Opatch.
b. Fix the root cause of the reported issue.
c. Resume the Opatch using the following command:
opatchauto apply resume
su - grid
# those are the patch numbers applied by the RU
$ORACLE_HOME/OPatch/opatch lsinventory | grep 34160635
$ORACLE_HOME/OPatch/opatch lsinventory | grep 34139601
$ORACLE_HOME/OPatch/opatch lsinventory | grep 34318175
$ORACLE_HOME/OPatch/opatch lsinventory | grep 33575402
exit
24. Run the following query to retrieve the patches applied on the database.
su - oracle
sqlplus / as sysdba
quit
Note: Observe that the RU does not apply the RU patch on the OJVM. If you want to apply a RU on
OJVM, refer to the designated practice.
Cleanup
Note: Do not delete the vm. You will need it for a future practice.
Summary
In high level, applying RU patches on Oracle Restart, involve the following steps:
o Decompressing the patch files into staging directories
o Preparing the environment for applying the patches
o Applying the patches to update GI and Oracle database homes using opatchauto utility