Oracle 12.1.0.2 on RHEL 6
I am using DBMS_REDEFINITION to shrink some tables with Primary Keys and LOBS following these steps:
1. DBMS_REDEFINITION.CAN_REDEF_TABLE
2. CREATE THE INTERIM TABLE:
CREATE TABLE <INTERIM_TABLE_NAME> AS SELECT * FROM <TABLE_NAME> WHERE ROWNUM<1;
3. DBMS_REDEFINITION.START_REDEF_TABLE
4. DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
5. DBMS_REDEFINITION_FINISH_REDEF_TABLE
The original table has an Index_Name like "TABLE_NAME_PK" and a Constraint_Name like "TABLE_NAME_PK" and the Type of Constraint is "Primary Key."
When I finish the Redefinition, the resulting table has an Index_Name like "TABLE_NAME_PK" but the Constraint is a System generated name like "SYS_C001234" and the Type of Constraint is "Check."
Is there something else I need to do in this process to take care of Primary Keys?
Thanks!