轉至 Partation Table
4.2 Start Redefinition Process
-- MAKE SURE NO ERROR REPORTED
SET SERVEROUTPUT ON;
EXECUTE DBMS_REDEFINITION.CAN_REDEF_TABLE( 'mike1','table6');
-- 所需時間229秒
BEGIN
DBMS_REDEFINITION.start_redef_table(
uname=>'mike1' ,
orig_table=>'table6',
int_table=>'table7');
END;
/
Error starting at line : 2 in command -
BEGIN DBMS_REDEFINITION.CAN_REDEF_TABLE('mike1','table6',DBMS_REDEFINITION.CONS_USE_rowid); END;
Error report -
ORA-23539: table "MIKE1"."TABLE6" currently being redefined
ORA-06512: at "SYS.DBMS_REDEFINITION", line 143
ORA-06512: at "SYS.DBMS_REDEFINITION", line 1635
ORA-06512: at line 1
23539. 00000 - "table \"%s\".\"%s\" currently being redefined"
*Cause: An attempt was made to redefine a table which is currently involved
in an ongoing redefinition.
*Action: Do not perform this redefinition operation on this table or wait
till the ongoing redefinition of the table is completed.
EXECUTE DBMS_REDEFINITION.abort_REDEF_TABLE('mike1','table6','table7');
Sync new table with interim data
BEGIN
DBMS_REDEFINITION.sync_interim_table(
uname=>'mike1' ,
orig_table=>'table6',
int_table=>'table7');
END;
/
Finish The Redefinition Porcess
BEGIN
DBMS_REDEFINITION.FINISH_REDEF_TABLE(
uname=>'mike1' ,
orig_table=>'table6',
int_table=>'table7');
END;
/
沒有留言:
張貼留言