Monday 12 March 2018

Patch failed due to INVALID package


Post Patch error:
Patch installation complete.  Total patches installed: 1
Validating logfiles...
Patch 24732088 apply: WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/24732088/20933516/24732088_apply_PRD_2017Sep07_19_50_09.log (errors)
    Error at line 38274: ORA-04021: timeout occurred while waiting to lock object

Please refer to MOS Note 1609718.1 and/or the invocation log
/u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_42917_2017_09_07_19_49_50/sqlpatch_invocation.log
for information on how to resolve the above errors.

Solution:
è  Reviewed patch logs and found error while creating or replace dbms_utility package body,  
create or replace package body dbms_utility wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object
è  Verified any blocking sessions in database and re-ran the script which is failed during post steps
SQL> @Post_script.sql
Session altered.

Warning: Package Body created with compilation errors.

è  Couple of errors reported in Alert log ,Checked components status on dba_registry and found Oracle Database Packages and Types is INVALID
Alert log:
Errors in file /u01/app/oracle/diag/rdbms/prd_sy1/prd1/trace/prd1_j001_225656.trc:
ORA-12012: error on auto execute of job "SYS"."AQ$_PLSQL_NTFN_1504781924"
ORA-04063: package body "SYS.DBMS_UTILITY" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_UTILITY"
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 11613
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 11778
          Comp Status:      
COMP_NAME                                          COMP_ID    VERSION      STATUS
-------------------------------------------------- ---------- ------------ -----------
Oracle Application Express                         APEX       5.0.4.00.12  VALID
Oracle Multimedia                                  ORDIM      12.1.0.2.0   VALID
Oracle Text                                        CONTEXT    12.1.0.2.0   VALID
Oracle Workspace Manager                           OWM        12.1.0.2.0   VALID
Oracle XML Database                                XDB        12.1.0.2.0   VALID
Oracle Database Catalog Views                      CATALOG    12.1.0.2.0   VALID
Oracle Database Packages and Types                 CATPROC    12.1.0.2.0   INVALID
JServer JAVA Virtual Machine                       JAVAVM     12.1.0.2.0   VALID
Oracle XDK                                         XML        12.1.0.2.0   VALID
Oracle Database Java Packages                      CATJAVA    12.1.0.2.0   VALID
Oracle Real Application Cluste                     RAC        12.1.0.2.0   VALID

11 rows selected.

     Started database in restrict mode and executed catalog.sql, catproc.sql and utlrp.sql, all component  are valid now
           
COMP_NAME                      COMP_ID    VERSION      STATUS
------------------------------ ---------- ------------ -----------
Oracle Application Express     APEX       5.0.4.00.12  VALID
Oracle Multimedia              ORDIM      12.1.0.2.0   VALID
Oracle Text                    CONTEXT    12.1.0.2.0   VALID
Oracle Workspace Manager       OWM        12.1.0.2.0   VALID
Oracle XML Database            XDB        12.1.0.2.0   VALID
Oracle Database Catalog Views  CATALOG    12.1.0.2.0   VALID
Oracle Database Packages and T CATPROC    12.1.0.2.0   VALID
JServer JAVA Virtual Machine   JAVAVM     12.1.0.2.0   VALID
Oracle XDK                     XML        12.1.0.2.0   VALID
Oracle Database Java Packages  CATJAVA    12.1.0.2.0   VALID
Oracle Real Application Cluste RAC        12.1.0.2.0   VALID

11 rows selected.