|
开始重定义时,就是基于中间表做同名物化视图。
- select * from dba_part_tables t where t.owner='HR'
- and t.table_name='T_BIG';
- DECLARE
- error_count PLS_INTEGER := 0;
- BEGIN
- DBMS_REDEFINITION.START_REDEF_TABLE
- ('HR', 'T_BIG', 'T_INTR', OPTIONS_FLAG => DBMS_REDEFINITION.CONS_USE_ROWID);
- DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS('HR', 'T_BIG', 'T_INTR',
- num_errors=>error_count);
- DBMS_OUTPUT.PUT_LINE('Errors := ' || TO_CHAR(error_count));
- DBMS_REDEFINITION.FINISH_REDEF_TABLE
- ('HR', 'T_BIG', 'T_INTR');
- END;
- select * from dba_part_tables t where t.owner='HR'
- and t.table_name='T_BIG';
复制代码
|
|