Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Vinesh.

Asked: August 07, 2020 - 1:15 pm UTC

Answered by: Chris Saxon - Last updated: August 07, 2020 - 3:51 pm UTC

Category: Database Development - Version: 19c

Viewed 100+ times

You Asked

This function DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS copy the dependent objects of the base table into interim. What is the use of it? And what will happen if I do not run this step?

and we said...

The docs seem clear to me on this one:

This procedure clones the dependent objects of the table being redefined onto the interim table and registers the dependent objects. This procedure does not clone the already registered dependent objects.

This subprogram is used to clone the dependent objects like grants, triggers, constraints and privileges from the table being redefined to the interim table (which represents the post-redefinition table).


> And what will happen if I do not run this step?

The new table will be missing all the indexes, constraints, etc. on the original! You'll have to create them manually, which can be a faff and easy to get wrong.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database