After running datapatch…the following messages will be printed out:
ERROR:
Connecting to database…OK
Gathering database info…done
Bootstrapping registry and package to current versions…done
Error: prereq checks failed!
verify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table
Prereq check failed, exiting without installing any patches.
// After that let us check:
SQL> select * from OPATCH_XML_INV ;
ERROR:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-04063: ORA-04063: package body “SYS.KUPU$UTILITIES” has errors
ORA-06508: PL/SQL: could not find program unit being called:
“SYS.KUPU$UTILITIES”
ORA-06512: at line 1
has errors
SOLUTION & Troubleshooting:
First, check database components that ALL of them are VALID and OK:
select * from dba_registry;
Then,
SQL> @?/rdbms/admin/prvthpui.plb
SQL> @?/rdbms/admin/prvtbpui.plb
SQL> alter package KUPW$WORKER compile body;
Then Try again Querying The table again:
SQL> select * from opatch_xml_inv ;
SQL> select dbms_sqlpatch.verify_queryable_inventory from dual;
SQL> exit
SQL> select object_name,STATUS from dba_objects where object_name=’KUPU$UTILITIES’;
worst case scenario copy the object SQL code definition from a database where the object is “valid” in it and run it against the database system.
re-run datapatch again.
I hope this will help.
Enjoy your 2024 summer 🙂