My Oracle Support Banner

DBMS_METADATA.GET_DDL Generates Incorrect DDL With UNUSED Columns (Doc ID 737601.1)

Last updated on MARCH 07, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.2 to 10.2.0.3 [Release 10.2]
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.

Symptoms

After an online redefinition of a table using the package DBMS_REDEFINITION and OPTIONS_FLAG=DBMS_REDEFINITION.CONS_USE_ROWID, the resulting table contains an additional hidden column. This hidden column is included in the DDL generated by procedure DBMS_METADATA.GET_DDL (fails to exclude unused columns).

In this situation, you can not use the output of this DBMS_METADATA.GET_DDL without manually editing the DDL before. DataPump import will also fail because the metadata import of a table will import a hidden column and the import job will fail as the table definitions are not matching.

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
References

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