Question: How do I use the
12c DBMS_QOPATCH
package to check my patches?
Answer: Prior to
Oracle 12c, it was not easy to List Oracle patches
In 12c and beyond, you can use the DBMS_QOPATCH package to list all
patches.
Rampant author Laurent Schneider,
author of the book "Advanced
SQL Programming has these notes on DBMS_QOPATCH.
"One of a cool new feature in Oracle 12c is the ability
to query Opatch. Oracle offers a set of tables and a PL/SQL
package to query the Oracle Inventory. With the
DBMS-QOPATCH procedure, you can query the inventory to know
if a one off patch has been deployed, which components have
been deployed etc. Tables related to this feature
include:
OPATCH_XML_INV
OPATCH_XINV_TAB
OPATCH_INST_JOB
OPATCH_INST_PATCH
This is the base
of the feature which is accessed through a PL/SQL package
DBMS_QOPATCH. The
DBMS_QOPATCH package has many functions,
including:
GET_OPATCH_BUGS
GET_OPATCH_LIST
GET_OPATCH_FILES
IS_PATCH_INSTALLED
For example, if we execute the GET_OPATCH_BUGS (which
provides bugs list in a specific patch or for all patches),
the result is a XML output:
SQL> select dbms_qopatch.GET_OPATCH_BUGS from dual;
We also see these DBMS-OQPATCH package invocations:
SQL> select
dbms_qopatch.GET_OPATCH_FILES from dual;
SQL> select
dbms_qopatch.IS_PATCH_INSTALLED from dual;
SQL> select
dbms_qopatch.GET_OPATCH_LIST from dual;
The Oracle
DBMS-OQPATCH documentation has complete details on using
the 12c DBMS-QOPATCH package.