My Oracle Support Banner

ORA-31600 While Running DBMS_METADATA.GET_DDL (Doc ID 1567572.1)

Last updated on DECEMBER 30, 2019

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 11-Jan-2016***


While trying to get any table or any object DDL using DBMS_METADATA, the following errors occurs

SQL> select dbms_metadata.GET_DDL('TABLE', 'Table_Name', 'SCHEMA') from dual;

ORA-31600: invalid input value COMPATIBLE for parameter VERSION in function GET_DDL
ORA-06512: at "SYS.DBMS_METADATA", line 3110
ORA-06512: at "SYS.DBMS_METADATA", line 3165
ORA-06512: at "SYS.DBMS_METADATA", line 4812
ORA-06512: at line 1


The Compatible parameter in database parameters file is set to proper value.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

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