Getting to grips with dbms_redefinition
<warning type="DBA" sub-type="Newbie"/>
Using 11g R1 (11.1.0.6.0).
I'm trying to get to grips with the dbms_redefinition package.
What's the recommended sequence for adding new columns to an existing table (specifically ones that are "not null" and have a default value)?
I've tried calling start_redef_table first and then modifying the transient table to add new columns, but this fails if I try to apply default values or non-nullability to the new columns, with a variety of errors:
Using 11g R1 (11.1.0.6.0).
I'm trying to get to grips with the dbms_redefinition package.
What's the recommended sequence for adding new columns to an existing table (specifically ones that are "not null" and have a default value)?
I've tried calling start_redef_table first and then modifying the transient table to add new columns, but this fails if I try to apply default values or non-nullability to the new columns, with a variety of errors:
ORA-01758: table must be empty to add mandatory (NOT NULL) column - (not null without 'default' clause)
ORA-01732: data manipulation operation not legal on this view <- (any 'default' clause)
0