- Release Notice
- Introduction
- Oracle DB Patch Installation
1.2 Oracle DB Patch Installation
Note:
This section has been created to ease the patch installation process. Refer to README.html of individual patches for any further information or clarification during patch installation). Do not consider these steps as replacement for official patch README documents.- Log in 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:33561268;Database PSU 12.1.0.2.220118,Oracle JavaVM Component (October 2022) 33477199;Database Patch Set Update : 12.1.0.2.220118 (33477199) OPatch succeeded.
- Download the Oracle October CPU 2022 patches using the following steps:
- Log in to support.oracle.com
- Click Patches and updates
- Enter 34386266 in patch number search field and click Search
- Click 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 34412250 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.32 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 consumes 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 p34386266_121020_Linux-x86-64.zip cd 34386266 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 34386266 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 34386266 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 p34412250_121020_Linux-x86-64.zip to
/u01/app
- Unzip p34412250_121020_Linux-x86-64.zip and check for conflicts by using
the following commands:
cd 34412250 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 34412250 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 34412250 successfully applied. Sub-set patch [33561268] 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:
34412250;Database PSU 12.1.0.2.221018,Oracle JavaVM Component (OCT2022) 34386266;Database Patch Set Update : 12.1.0.2.221018 (34386266)
- 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.Note:
The latest available patch at the time of consolidating these steps was OCT PSU 2022. It is always advisable to pick any superseded patch at the time of applying this patch so that we always patch the system with the latest available patch for our database server.It is always advisable to pick any superseded patch at the time of applying this patch so that we always patch the system with the latest available patch for our database server.