While applying Oracle 19c RU patch (33859214) in production, the OPatch prerequisite conflict check failed with the following error:
Unable to create Patch Object.
Exception occured : PatchObject constructor:
Input file ".../33803476/etc/config/actions" or
".../33803476/etc/config/inventory" does not exist.
OPatch failed with error code 2
This error occurred during the command:
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
What I Did Initially (Incorrect Approach)
- Unzipped the RU patch under Oracle Home.
- Ran prereq check from the top-level patch directory (33859214).
- OPatch failed with error code 2.
- Checked logs under:
$ORACLE_HOME/cfgtoollogs/opatch
Root Cause
The RU patch (33859214) is a bundle patch, which internally contains multiple sub-patches.
The prereq check must NOT be executed from the top-level patch directory.
Instead:
- OPatch expects a valid sub-patch directory containing
etc/config/actions and inventory.
Running prereq from the wrong level causes OPatch to fail with “Unable to create Patch Object”.
Correct Solution
1.Update OPatch (Mandatory)
Check OPatch version:
[oracle@vbox OPatch]$ cd $ORACLE_HOME/OPatch
[oracle@vbox OPatch]$ ./opatch version
If version is outdated (<12.2.0.1.30 for 19c RU):
[root@vbox dbhome_1]# mv OPatch bkp_OPatch_<date>
[root@vbox dbhome_1]# unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[root@vbox dbhome_1]# chown -R oracle:oinstall $ORACLE_HOME/OPatch
Navigate to the Correct Sub-Patch Directory:
[oracle@vbox ~]$ cd $ORACLE_HOME/33859214/33803476
[oracle@vbox 33803476]$ ls
Expected sub-patch directories:
33806152 33815596 bundle.xml
[root@vbox dbhome_1]# cd $ORACLE_HOME
[root@vbox dbhome_1]# chown -R oracle:oinstall OPatch
2. Navigate to the Correct Sub-Patch Directory
[oracle@vbox ~]$ cd $ORACLE_HOME/33859214/33803476
[oracle@vbox 33803476]$ ls
33806152
33815596
bundle.xml
3. Run Prereq Check from Sub-Patch
[oracle@vbox 33803476]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
4. System Space Check (Multiple Patches)
Create a list file:
[oracle@vbox ~]$ vi /tmp/patch_list_dbhome.txt
Add:
/u01/app/oracle/product/19.0.0/dbhome_1/33859214/33803476/33806152
/u01/app/oracle/product/19.0.0/dbhome_1/33859214/33803476/33815596
Run:
[oracle@vbox dbhome_1]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
5. Stop Database & Listener
SQL> shutdown immediate;
[oracle@vbox ~]$ lsnrctl stop
6. Apply Patch
[oracle@vbox ~]$ cd $ORACLE_HOME/33859214/33803476/33806152
[oracle@vbox 33806152]$ $ORACLE_HOME/OPatch/opatch apply
7. Run Datapatch
DB Level
[oracle@vbox dbhome_1]$ ./datapatch -verbose
8. Verification
SQL> SELECT * FROM dba_registry_sqlpatch;
OS Level
[oracle@vbox OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory