美文网首页
Oracle数据误删恢复

Oracle数据误删恢复

作者: 夹胡碰 | 来源:发表于2020-04-16 16:55 被阅读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;

相关文章

网友评论

      本文标题:Oracle数据误删恢复

      本文链接:https://www.haomeiwen.com/subject/excdvhtx.html