oracle 闪回表

1600阅读 0评论2013-09-03 zyrf2001
分类:Oracle

 

create table zcl_exam_train_officer              as select * from        exam_train_officer       as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_exam_train_publish              as select * from        exam_train_publish       as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_exam_train                      as select * from        exam_train               as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_officer_assigned                as select * from        officer_assigned         as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_officer_info                    as select * from        officer_info             as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_officer_assign_detail           as select * from        officer_assign_detail    as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_test_sites                      as select * from        test_sites               as of timestamp to_date('20130903151500','yyyymmddhh24miss');
create table zcl_officer_assign                  as select * from        officer_assign           as of timestamp to_date('20130903151500','yyyymmddhh24miss');


select count(*) from zcl_exam_train_officer          union all
select count(*) from zcl_exam_train_publish          union all
select count(*) from zcl_exam_train                  union all
select count(*) from zcl_officer_assigned            union all
select count(*) from zcl_officer_info                union all
select count(*) from zcl_officer_assign_detail       union all
select count(*) from zcl_test_sites                  union all
select count(*) from zcl_officer_assign            


alter table  exam_train_officer              enable row movement;
alter table  exam_train_publish              enable row movement;
alter table  exam_train                      enable row movement;
alter table  officer_assigned                enable row movement;
alter table  officer_info                    enable row movement;
alter table  officer_assign_detail           enable row movement;
alter table  test_sites                      enable row movement;
alter table  officer_assign                  enable row movement;


flashback table exam_train_officer       to timestamp to_date('20130903151500','yyyymmddhh24miss');
flashback table exam_train_publish      to timestamp to_date('20130903151500','yyyymmddhh24miss');
flashback table test_sites              to timestamp to_date('20130903151500','yyyymmddhh24miss');

flashback table officer_info            to timestamp to_date('20130903151500','yyyymmddhh24miss');

flashback table exam_train              to timestamp to_date('20130903151500','yyyymmddhh24miss');

flashback table officer_assign          to timestamp to_date('20130903151500','yyyymmddhh24miss');

flashback table officer_assigned        to timestamp to_date('20130903151500','yyyymmddhh24miss');

flashback table officer_assign_detail   to timestamp to_date('20130903151500','yyyymmddhh24miss');

上一篇:nginx配置成windows服务器
下一篇:windows下配置oracle11g的dataguard