Error validating database 121 sql error opening connection

(output truncated) The examples above are interesting but to make it truly useful for patch application querying, monitoring, and reporting we need join the output of DBMS_QOPATCH (which is showing us what’s installed into the Oracle Home) with the new 12c view DBA_REGISTRY_SQLPATCH (which shows us what patches are applied to the database).

It’s based on an external table using a directory object running an external batch file (through the external table preprocessor option) which then runs the actual OPatch utility.And we can query that external table directly if we want though we’ll get an XMLTYPE result: Oracle gives us a wrapper API to this new external table (OPATCH_XML_INV) with DBMS_QOPATCH to make working with the output more manageable.Or just to report accurately on patch deployments for security compliance reports, general database security assessments, or database health checks.This is actually quite a significant breakthrough with regards to patch management!Sometimes one-off critical bug fix patches are important in the environment.

Other times regular and consistent application of the quarterly PSUs is important to the organization (i.e. For sake of illustration I’m going to use the later as my need case for the duration of this article as I’ve regularly run into the situation where clients need PSUs applied properly, regularly, and consistently to their databases.For example we can start with some basic information on the inventory using DBMS_QOPATCH.GET_OPATCH_INSTALL_INFO : But as we see the output still isn’t easy on the eyes.The preprocessor clause was added in Oracle 11g release 2 (and back-ported to Oracle11g R1) to allow for execution of an external script/file to process data before reading it in the database via an external table.A further explanation of this feature is beyond the scope of this article.B) A data guard standby switch-over or fail-over where the primary Oracle home was patched but the standby home was missed.