exec dbms_redefinition.can_redef_table ('SCHEMA_S', 'TAB1' );
create table TAB2 as select * from TAB1 where 1=2;
exec dbms_redefinition.start_redef_table('SCHEMA_S', 'TAB1', 'TAB2');
exec dbms_redefinition.copy_table_dependents('SCHEMA_S', 'TAB1','TAB2',TRUE, TRUE, TRUE, FALSE);
exec dbms_redefinition.sync_interim_table('SCHEMA_S', 'TAB1','TAB2');
exec dbms_redefinition.finish_redef_table('SCHEMA_S', 'TAB1','TAB2');
drop table TAB2;
No comments:
Post a Comment