ITPub博客

首页 > 数据库 > Oracle > 数据库表恢复

数据库表恢复

原创 Oracle 作者:今天好像很闲 时间:2019-12-05 14:45:35 0 删除 编辑

第一步:查询当前系统时间

 select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

第二步:查询删除数据的时间点的数据

  select * from 表名 as of timestamp to_timestamp('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss');  (如果不是,则继续缩小范围)

第三步:恢复删除且已提交的数据

  flashback table 表名 to timestamp to_timestamp('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss');

  注意:如果在执行上面的语句,出现错误。可以尝试执行 alter table 表名 enable row movement; //允许更改时间戳


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31546362/viewspace-2667078/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2018-07-17

  • 博文量
    1
  • 访问量
    242