通过时间恢复删除数据
alter table DRUGUSAGE enable row movement; --开启行迁移
select * from DRUGUSAGE as of timestamp to_timestamp('2016-06-02 12:00:47','yyyy-mm-dd hh24:mi:ss'); --查询2016-06-02 12:00:47点的表数据
flashback table DRUGUSAGE to timestamp to_timestamp('2016-06-02 12:00:00','yyyy-mm-dd hh24:mi:ss'); --恢复2016-06-02 12:00:47点的表数据
select * from DRUGUSAGE;
通过 scn 恢复删除数据
alter table DRUGUSAGE enable row movement; --开启行迁移select current_scn from v$database; --查询当期表的操作scn
select * from DRUGUSAGE as of scn 3600000 order by type asc; --根据scn查表数据
flashback table DRUGUSAGE to scn 3600000; --数据恢复到scn操作
select * from DRUGUSAGE;