-
EXEC DBMS_REDEFINITION.CAN_REDEF_TABLE('A','SMALL2',DBMS_REDEFINITION.CONS_USE_ROWID)
-
-
drop table BIG_PART;
-
create table BIG_PART
-
partition by RANGE(LAST_DDL_TIME)
-
INTERVAL (NUMTODSINTERVAL(1,'day')) STORE IN (users)
-
(
-
PARTITION part20220901 VALUES LESS THAN(to_date('2022-09-02 00:00:00','yyyy-mm-dd hh24:mi:ss'))
-
)
-
as select * from SMALL2 WHERE 1=2;
-
-
EXEC DBMS_REDEFINITION.START_REDEF_TABLE('A', 'SMALL2', 'BIG_PART', '', dbms_redefinition.CONS_USE_ROWID)
-
-
DECLARE
-
num_errors PLS_INTEGER;
-
BEGIN
-
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS('A', 'SMALL2','BIG_PART',
-
DBMS_REDEFINITION.CONS_ORIG_PARAMS, TRUE, TRUE, TRUE, TRUE, num_errors);
-
END;
-
/
-
-
select object_name, base_table_name, ddl_txt from DBA_REDEFINITION_ERRORS;
-
-
EXEC DBMS_REDEFINITION.SYNC_INTERIM_TABLE('A', 'SMALL2','BIG_PART')
-
EXEC DBMS_REDEFINITION.FINISH_REDEF_TABLE('A', 'SMALL2','BIG_PART')
select owner,object_name,object_type from dba_objects where owner='A' ORDER BY 2;
阅读(380) | 评论(0) | 转发(0) |