Oracle数据误删恢复

2020-04-16  本文已影响0人  夹胡碰

数据恢复

-- 历史数据查询
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');

拓展

-- 查看
show parameter undo;

-- 重设undo_retention
alter system set undo_retention=60 scope=both;
上一篇 下一篇

猜你喜欢

热点阅读