数据恢复
代码语言:javascript
复制-- 历史数据查询
select * from mytest as of timestamp to_timestamp('2020-04-15 16:2:00','yyyy-mm-dd hh24:mi:ss');
-------------
-- 数据恢复 --
-------------
-- 方法一
insert into mytest(
select * from mytest as of timestamp to_timestamp('2020-04-10 10:30:00','yyyy-mm-dd hh24:mi:ss'));
-- 方法二
alter table t enable row movement;
flashback table mytest to timestamp to_timestamp('2020-04-10 10:30:00','yyyy-mm-dd hh24:mi:ss');
拓展
代码语言:javascript
复制-- 查看
show parameter undo;
-- 重设undo_retention
alter system set undo_retention=60 scope=both;