DBMS_DDL.ALTER_COMPILE OTHER THAN SYS USER RESULTS IN ORA-04047. (Doc ID 1586470.1)

Last updated on SEPTEMBER 23, 2013

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.5 to 11.2.0.4 [Release 10.2 to 11.2]
PL/SQL - Version 10.2.0.5 to 11.2.0.4 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Symptoms

dbms_ddl.alter_compile other than SYS user fails with below error.
Works fine when run it as SYS user.

ERROR:
=======
exec dbms_ddl.alter_compile ('PACKAGE BODY','SCHEMANAME','PACKAGENAME'');
BEGIN dbms_ddl.alter_compile ('PACKAGE BODY','SCHEMANAME','PACKAGENAME'); END;

*
ERROR at line 1:
ORA-04047: object specified is incompatible with the flag specified
ORA-06512: at "SYS.DBMS_UTILITY", line 156
ORA-06512: at "SYS.DBMS_DDL", line 157
ORA-06512: at line 1

Cause

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 hundreds of Community platforms