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

Last updated on NOVEMBER 28, 2016

Applies to:

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

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