My Oracle Support Banner

Effect Of DBMS_REDEFINITION on Foreign Key Constraints (Doc ID 1914611.1)

Last updated on JANUARY 02, 2020

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 10.2 to 12.1]
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 Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.


Redefining a table with a foreign key constraint that refers to the same table, leaves the constraint in a disabled state. However, Foreign key constraints that refer to other tables, behave as expected. i.e., the constraint is re-enabled at the end of the redefinition.

SQL> exec dbms_redefinition.abort_redef_table(user, 'foo_child', 'foo_child_i');

The FK is disabled:

------------------------------ --------
SYS_C0033255                   ENABLED  
FOO_PK                             ENABLED  
SYS_C0033258                   ENABLED  
FOO_CHILD_FK                   DISABLED
FOO_CHILD_PK                   ENABLED  

The stack is likely to include function kkzumco2


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.