HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

Oracle: How can I add ROWDEPENDENCIES to an existing table?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
canrowdependencieshowexistingoracletableadd

Problem

If I have a table t

create table t (x var number);


How can I modify the table so that it appears to have been created with rowdependencies?

create table t (x var number) rowdependencies;

Solution

Unfortunately, you can't (unless something has changed in 12c that I'm not aware of). You'll have to recreate the table with rowdependencies and move all the data from the old table to the new one.

Of course, you could use the dbms_redefinition package to do this redefinition online. But under the covers, you'd still be creating a new table with rowdependencies enabled, copying the data over, dropping the old table and renaming the new one. It would just involve potentially less downtime (at a cost to how long it takes and how much DBA time is required).

Context

StackExchange Database Administrators Q#58327, answer score: 4

Revisions (0)

No revisions yet.