My Oracle Support Banner

DBMS_STATS , DBMS_SQLTUNE_INTERNAL , DBMS_SQLTUNE Package Can Not be Recompiled during/After Upgrade reporting "ORA-04063" , "ORA-06508" . "ORA-06512" (Doc ID 761961.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 12.2.0.1 [Release 10.2 to 12.2]
Information in this document applies to any platform.

Symptoms

During/After upgrade to11.2.0.x or 12.1 the components "Oracle Server" is invalid and lots of objects remain invalid.

The upgrade shows error altering some packages. usually DBMS_SQLTUNE_INTERNAL and/or DBMS_SQLTUNE package :

LINE/COL ERROR
-------- -----------------------------------------------------------------
6370/5 PL/SQL: SQL Statement ignored
6376/18 PL/SQL: ORA-00980: synonym translation is no longer valid 

Catupgrd0.log reports below query and error

12:19:46 SQL> EXECUTE dbms_stats.gather_table_stats('SYS', 'AW$')
BEGIN dbms_stats.gather_table_stats('SYS', 'AW$'); END;

*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLTUNE"
ORA-06512: at "SYS.DBMS_STATS", line 34634
ORA-06512: at line 1


Elapsed: 00:00:02.50
12:19:48 SQL> EXECUTE dbms_stats.gather_table_stats('SYS', 'PS$')
BEGIN dbms_stats.gather_table_stats('SYS', 'PS$'); END;

*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLTUNE"
ORA-06512: at "SYS.DBMS_STATS", line 34634
ORA-06512: at line 1

 

NOTE: it could occurs also for other packages like DBMS_WORKLOAD_REPLAY or DBMS_WRR_INTERNAL

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!


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