I am connected by sqlplus with sys as sysdba to an oracle database 11.2.0.4 Enterprise edition. If I run the query :
select DBMS_METADATA.GET_DDL ( 'TYPE' , 'SYS_PLSQL_9131_DUMMY_1' , 'SYS' ) from dual ;
I get error the error
*ORA-31603: object "SYS_PLSQL_9131_DUMMY_1" of type TYPE not found in schema "SYS"
ORA-06512: at "SYS.DBMS_METADATA", line 5805
ORA-06512: at "SYS.DBMS_METADATA", line 8344*
I get similar errors too if I run
select DBMS_METADATA.GET_DDL ( 'TYPE_BODY' , 'SYS_PLSQL_9131_DUMMY_1' , 'SYS' ) from dual ;
select DBMS_METADATA.GET_DDL ( 'TYPE_SPEC' , 'SYS_PLSQL_9131_DUMMY_1' , 'SYS' ) from dual ;
If I query DBA_OBJECTS
or DBA_SOURCE
, the object of type TYPE is there.
I get these errors even if I query other TYPE type objects in the SYS schema, but not all the TYPE type objects give me this problem.
Those types should be implicitly created by a package. Query DBA_OBJECTS for object_id 9131 (the number in the type name).
It probably refers to a package that has a function which returns a value with a datatype defined in the package specification rather than a simple VARCHAR2 / NUMBER / DATE.