ITPub博客

首页 > Linux操作系统 > Linux操作系统 > dbms_redefinition

dbms_redefinition

原创 Linux操作系统 作者:cdbdp 时间:2013-05-14 21:47:05 0 删除 编辑
exec dbms_redefinition.can_redef_table('scott','t1',dbms_redefinition.CONS_USE_ROWID);
exec dbms_redefinition.can_redef_table('scott','t1',dbms_redefinition.CONS_USE_PK);
CREATE TABLE scott.t1_pa
(a number,
 b varchar2(48 char)
)
PARTITION BY RANGE(a)
(PARTITION emp10000 VALUES LESS THAN (10000),
PARTITION emp20000 VALUES LESS THAN (20000),
PARTITION emp110000 VALUES LESS THAN (110000));
exec DBMS_REDEFINITION.START_REDEF_TABLE('scott', 't1','t1_pa','a a, b b',dbms_redefinition.cons_use_rowid);
declare
num_errors PLS_INTEGER;
begin
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS('scott', 't1','t1_pa',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('scott', 't1', 't1_pa');
exec dbms_redefinition.finish_redef_table('scott', 't1', 't1_pa');
drop table t1_pa purge;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23382569/viewspace-761074/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: dbms_file_transfer
下一篇: dbms_stats
请登录后发表评论 登录
全部评论

注册时间:2010-02-22

  • 博文量
    51
  • 访问量
    105410