My Oracle Support Banner

Datapatch fails with AWR related errors ORA-13518 ORA-06512 in SE/SE2 (Doc ID 2965147.1)

Last updated on JULY 22, 2024

Applies to:

Oracle Database - Standard Edition - Version 19.10.0.0.0 and later
Information in this document applies to any platform.

Symptoms

On or After : 19.0 version, RDBMS

Only applicable for Standard Edition/SE2 Database


Datapatch run fails with:


SQL> declare
  2 ldbid number;
  3 cnt number;
  4 begin
  5 ldbid := sys_context('USERENV','CON_DBID');
  6
  7 select count(*) into cnt
  8 from sys.wrm$_wr_control
  9 where dbid = ldbid;
 10
 11 if (cnt > 0) then
 12 sys.dbms_management_bootstrap.fixup_awr_catalog(bug_num=>35012866);
 13 end if;
 14 end;
 15 /
declare
*
ERROR at line 1:
ORA-13518: Invalid database id (0)
ORA-06512: at "SYS.DBMS_MANAGEMENT_BOOTSTRAP", line 124
ORA-06512: at "SYS.DBMS_MANAGEMENT_BOOTSTRAP", line 141
ORA-06512: at line 12

Then Customer tries to run below and it also fails with error.

SQL> exec dbms_workload_repository.create_snapshot;
BEGIN dbms_workload_repository.create_snapshot; END;

*
ERROR at line 1:
ORA-13516: AWR Operation failed: AWR Schema not initialized
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 99
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 145
ORA-06512: at line 1


SQL> xec dbms_swrf_internal.register_local_dbid;
SP2-0734: unknown command beginning "xec dbms_s..." - rest of line ignored.
SQL>
SQL>
SQL> exec dbms_swrf_internal.register_local_dbid;
BEGIN dbms_swrf_internal.register_local_dbid; END;

*
ERROR at line 1:
ORA-13509: error encountered during updates to a AWR table
ORA-01405: fetched column value is NULL
ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 111
ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 267
ORA-06512: at line 1


Changes

 PSU JUL2023 for 19c version applied with errors

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.