Permissions needed for dbms_metadata.get_ddl to custom or read only user

SELECT DBMS_METADATA.GET_DDL('PACKAGE_BODY','"XX_CUSTOMER_PKG','APPS') 

FROM dual; 


ORA-31603: object "XX_CUSTOMER_PKG" of type PACKAGE_BODY not found in schema "APPS"

ORA-06512: at "SYS.DBMS_METADATA", line 6731

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105

ORA-06512: at "SYS.DBMS_METADATA", line 6718

ORA-06512: at "SYS.DBMS_METADATA", line 9734

ORA-06512: at line 1

31603. 00000 -  "object \"%s\" of type %s not found in schema \"%s\""

*Cause:    The specified object was not found in the database.

*Action:   Correct the object specification and try the call again.


FIX :

SQL> conn / as sysdba
Connected.
SQL> grant select_catalog_role to <CUSTOM USER>;

Grant succeeded.


Post a Comment

0 Comments