opatch is typically used to patch files located under the Oracle Home (such as binaries or timezone files) and needs therefore to be run while the instance is down. datapatch which patches data «inside» the database. $ORACLE_HOME/OPatch/opatch is a shell or .bat script. Usage: opatch [ -help ] [ -report ] [ command ]
apply | Applies an interim patch to an Oracle Home. System patches are not supported with this command. Compare with napply. |
compare | Compares two files produced with opatch lsinv -xml |
lsinventory | Lists the inventory for a particular $ORACLE_HOME or display all installations that can be found. |
lspatches | Lists and verifies patch metadata specified by patch ID (installed in Oracle Home) or patch location. |
napply | Applies a set of patches at a time. Like apply, system patches are not supported with this command. |
nrollback | Rolls back a set of patches at a time |
rollback | Roll back an existing patch indicated by a reference id. |
query | Loads and prints out various information about a patch. |
version | Prints the version of OPatch for a particular Oracle home or displays all OPatch versions in the central inventory. |
prereq | Runs the prerequisite checks on an Oracle Home. |
util | invokes the specified utility in an Oracle Home |
$ $ORACLE_HOME/OPatch/opatch lsinventory $ $ORACLE_HOME/OPatch/opatch lsinventory | grep 'Patch description'
select * from sys.registry$history;
opatch lsinventory -xml can also be queried using the dbms_qopatch package. $ORACLE_HOME/OPatch/opatch lsinventory -detail … Installed Products (132): Assistant Common Files 23.0.0.0.0 BLASLAPACK Component 23.0.0.0.0 Buildtools Common Files 23.0.0.0.0 … XML Parser for Java 23.0.0.0.0 XML Parser for Oracle JVM 23.0.0.0.0 There are 132 products installed in this Oracle Home.
opatch determines the location of the oraInventor by reading /etc/oraInst.loc. $ opatch apply -invPtrLoc /path/to/oraInst.loc $ opatch lsinventory -invPtrLoc /path/to/oraInst.loc
$ORACLE_HOME/cfgtoollogs/opatch/opatch_history.txt. dbms_qopatch