In this post, we will be discussing opatch, How to check the opatch version or opatch version command, apply the patch(opatch apply), Upgrade, opatch lsinventory etc
How to check the opatch version(opatch version command)
we can check the opatch version using the below command
Log in to the Oracle Database server
Source the Oracle Home
$ORACLE_HOME/OPatch/opatch version
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2021, Oracle Corporation. All rights reserved.
How to upgrade the opatch version
Looks out for the required version for patch 6880880
Download the patch to the server
Unzip the patch and the directory OPatch will be there
Then follow the below command
cd $ORACLE_HOME
mv OPatch OPatch_bk
cp -pr <stage location>/OPatch $ORACLE_HOME
If you do the opatch version command after these steps, you will see the version has been updated. You will require an upgrade whenever you are applying the latest PSU patches
How to apply the patch using opatch
- Download the patch and Unzip the patch on the server
- Source the Oracle Home
- Now apply using the below command
cd <patch stage>/<patch no>
$ORACLE_HOME/OPatch/opatch apply
How to run Opatch conflict
- Download the patch and Unzip the patch on the server
- Source the Oracle Home
- Now apply using the below command
cd <patch stage>/<patch no>
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
how to check if a patch is applied in the Oracle database
We can check the patches using the below command
$ORACLE_HOME/OPatch/opatch lspatches |grep <patch no>
Or
$ORACLE_HOME/OPatch/opatch lsinventory |grep <patch no>
How to check the patches applied in Oracle Database (opatch lsinventory)
We can find the patches applied in Oracle using the opatch lsinventory command
Login to Database server Source the Oracle Home $ORACLE_HOME/OPatch/opatch lsinventory
If we want more details on the patches applied, we can use opatch lsinventory with -details options
$ORACLE_HOME/OPatch/opatch lsinventory -detail
We can also just use opatch lspatches to find the patches applied
Login to the Database server
Source the Oracle Home
$ORACLE_HOME/OPatch/opatch lspatches
I hope you like this content on the opatch version command, opatch apply, opatch lsinventory,opatch lspatches
Related Articles
How to run Opatch in non-interactive form : check out How to run opatch in non-interactive form for applying multiple patches, syntax and options available
rollback the oracle patch : check out this on how to rollback the oracle patch like database patch,application patch,Application server patch with detailed steps
download Patch from Oracle using Wget : Downloading oracle patches from Oracle website is time consuming. We download Patch from Oracle using Wget directly to the server to save time and energy
check patches applied in WebLogic : This page contain details on how to check patches applied in weblogic in version 10.3.6,12.1.1,12.1.1 above with commands
how to check oracle version: check out how to find the version of oracle database. what is the latest Oracle Version, what is innovation and long-term release