Today after patching our databases, datapatch was failing with these errors:

[oracle@server ~]$  $ORACLE_HOME/OPatch/datapatch -verbose
...

  -> Error at line 224760: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
  -> Error at line 224832: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
  -> Error at line 224893: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
  -> Error at line 224957: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
  -> Error at line 225022: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
  -> Error at line 225088: script olap/admin/xoqawmd.sql
      - ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP
      - technical support.
      - ORA-04067: not executed, package "SYS.DBMS_AW" does not exist
Patch 37847857 apply: WITH ERRORS (PREV PATCH)
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37847857/27534561/37847857_apply_DCMS_2025Dec11_11_17_19.log (no errors)

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

SQL Patching tool complete on Thu Dec 11 11:19:16 2025
[oracle@server ~]$ 

I found few suggestions of deinstall/reinstall OLAP, run few scripts, etc etc, all very destructive. At the end, issue was just a missing grant:

set linesize 150
set pagesize 50
column grantee format a20
column privilege format a15
column table_schema format a15
column table_name format a20
select grantee, owner as table_schema, table_name, privilege, grantable
from dba_tab_privs
where table_name = 'DBMS_AW'
and owner = 'SYS'
and grantee = 'PUBLIC'
and privilege = 'EXECUTE'
order BY grantee, privilege;

no rows selected

So the fix was just:

SQL> grant execute on DBMS_AW to public;

After this, datapatch runs ok:

[oracle@server ~]$  $ORACLE_HOME/OPatch/datapatch -verbose
...
Installing patches...
Patch installation complete.  Total patches installed: 2

Validating logfiles...done
Patch 37960098 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37960098/27635722/37960098_apply_DCMS_2025Dec11_11_22_26.log (no errors)
Patch 37847857 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37847857/27534561/37847857_apply_DCMS_2025Dec11_11_22_03.log (no errors)
SQL Patching tool complete on Thu Dec 11 11:24:01 2025
[oracle@server ~]$
Last modified: 11 December 2025

Author

Comments

Write a Reply or Comment

Your email address will not be published.