Database Utilities (MOSC)

MOSC Banner

Getting to grips with dbms_redefinition

edited Jul 28, 2011 5:52AM in Database Utilities (MOSC) 1 commentAnswered
<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:
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)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center