DBMS_METADATA.GET_DDL Fails With ORA-31603 For Constraint_type = 'R'

(Doc ID 207674.1)

Last updated on AUGUST 28, 2017

Applies to:

PL/SQL - Version 9.2.0.8 and later
Oracle Database - Enterprise Edition - Version 9.2.0.8 and later
Information in this document applies to any platform.
***Checked for relevance on 24-Aug-2017***

Symptoms

Calling DBMS_METADATA.GET_DDL fails for referential constraints on execution of the following SQL select statement:


ERROR:
ORA-31603: object "TESTTAB_FK" of type CONSTRAINT not found in schema "SCOTT"
ORA-06512: at "SYS.DBMS_METADATA", line 5088
ORA-06512: at "SYS.DBMS_METADATA", line 7589
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