- Release Notice
- Introduction
- Oracle DB Patch Installation
Oracle DB Patch Installation
- Login to Oracle VM as admusr and change to oracle user.
- List current patches applied using the following command:
opatch lspatches
The output must be as follows:27923320;Database PSU 12.1.0.2.180717, Oracle JavaVM Component (JUL2018) 27547329;Database Patch Set Update : 12.1.0.2.180717 (27547329) OPatch succeeded.
- Download the Oracle Jan CPU 2022 patches using the following steps:
- Login to support.oracle.com
- Click on Patches and updates
- Enter 33477199 in patch number search field and click Search
- Click on DATABASE PATCH SET UPDATE 12.1.0.2.220118 (Patch) for Linux x86-64 platform
- Click Download to download the patch to your local machine from the new window
- Repeat the same process for 33561268 patch as well.
- It is recommended to take a back up of ORACLE_HOME so that it can be
restored it to previous state in case of any issues during current patch
installation. Here is an illustration to restore ORACLE_HOME:
Note:
Make a note of the permissions of files/directory so that they can be restored to their original state if needed in future. Shutdown databases, listeners, or any other processes related to the ORACLE_HOME which you are taking backup.- Shutdown databases, listeners, or any other processes related to the
ORACLE_HOME which you are restoring.
Note:
This step would be mandatory in the case of restore. - Navigate to the directory where ORACLE_HOME is located.
cd /u01/app/oracle/product/12.1.0.2
- Rename or move the current ORACLE_HOME:
mv dbhome_1 db1_bkup
- Restore ORACLE_HOME
tar -pxvf oracle_home_bkup.tar
Note:
- The file taken for backup has to be used here.
- Also ensure that there is enough free disk space before restoring the backup.
- Shutdown databases, listeners, or any other processes related to the
ORACLE_HOME which you are restoring.
- The Central Inventory where the Oracle_Home is registered should also be
part of the backup and taken at the same time as the ORACLE_HOME backup for
consistency. Take a backup of
/u01/app/oraInventory
and restore it later if necessary - Use the OPatch utility version 12.2.0.1.28 or later. To apply this patch Oracle recommends that you use the latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880(https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880) by selecting the 12.2.0.1.0 release.
- Install OPatch
To install this patch, extract the file "zipped file" directly under the ORACLE_HOME. Perform the following steps for extracting the zip file of OPatch.
- Take a backup of
ORACLE_HOME/OPatch
into a dedicated backup location.Note:
This step can be ignored if backup is already taken. - Ensure that no directory ORACLE_HOME/OPatch exists.
- Unzip the OPatch downloaded zip into
ORACLE_HOME
directory.
To check the version of the opatch utility installed in the above step, navigate to the OPatch directory and run
opatch version
. You can remove the OPatch zip file after verifying the version. - Take a backup of
- It is required to increase the logical volume of
/u01/app
to 35 GB from current 25 GB as the zip file is huge and comsumes significant space while applying patch. This can be performed using the following commands.sudo lvresize -L +10G /dev/mapper/vgroot-oracle sudo resize2fs /dev/mapper/vgroot-oraclep
This also ensure that there is sufficient space still left for normal DB operations.
- Copy the downloaded zip file to
/u01/app
directory and unzip the file before patching. - Unzip and check conflicts before applying patch by using the following
commands:
unzip p33477199_121020_Linux-x86-64.zip cd 33477199 opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Ensure that there are no conflicts before proceeding to next step. Also, remove the zip file from
/u01/app
to reclaim space. - Apply the patch
opatch apply
Note:
- Ensure that you have logged in to 33477199 directory before applying patch.
- You will prompted with "Do you want to proceed? [y|n]" twice during the process. Type y when prompted on both the occassions.
Patch successfully applied. Composite patch 33477199 successfully applied.Log file location:/u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch<time-stamp>.log
OPatch succeeded. - You can remove both zip and unzipped folder from
/u01/app
after the patch installation is successful. - Copy the downloaded p33561268_121020_Linux-x86-64.zip to
/u01/app
- Unzip p33561268_121020_Linux-x86-64.zip and check for conflicts by using
the following commands:
cd 33561268 opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Note:
Ensure that there are no conflicts before proceeding to next step. - Apply the patch
opatch apply
Note:
- Ensure that you have logged in to 33561268 directory before applying patch.
- You will prompted with "Do you want to proceed? [y|n]" twice during the process. Type y when prompted on both the occassions.
Patch 33561268 successfully applied. Sub-set patch [27923320] has become inactive due to the application of a super-set patch [33561268]. Log file location:/u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch<time-stamp>.log
OPatch succeeded. - opatch lspatches lists the following patches:
33561268;Database PSU 12.1.0.2.220118,Oracle JavaVM Component(JAN2022) 33477199;Database Patch Set Update : 12.1.0.2.220118(33477199)
- You can further verify the details using the following command:
opatch lsinventory
- It is recommended to delete the zip and unzipped directories from
/u01/app
to reclaim space.