Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Online redefinition using DMBS_REDEFINITION

Girish AFeb 27 2011 — edited Mar 2 2011
Database version :oracle 10g R2

I want to move multiple tables,indexes,logsegments and logindexes in different tablespaces.

As per my understanding for achieving this ONLINE ( means all objects to be moved should be available during the whole operation to end users) i have to user DBMS_REDEFINITION package.

So i am following following steps.

1. Use dbms_redefinition.can_redef_table to check if table is redefined.
2. Create interim table from the base table using CTAS
3. Start redefinition using start_redef_table procedure.
4. Copy all dependent to interim table using copy_table_dependents procedure
5. Finish redefinition using finish_redef_table

But during step 2 the CTAS will not copy any DEFAULT values present on columns.

My question are

1. Is any other method is available to create interim table. So i cant miss anything on table.Not sure if CTAS miss anything else otner than DEFAULT on columns.
2. Is any method is availble to automate this whole redefinition process.
3. Is any other method is availble other to DMBS_REDEFINITION to achieve this online.

Thanks
Girish
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2011
Added on Feb 27 2011
11 comments
538 views