ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 误删数据闪回方法

误删数据闪回方法

原创 Linux操作系统 作者:jiaosongs 时间:2013-05-23 15:36:35 0 删除 编辑

误删数据闪回方法
1.
登陆dba权限用户
2.show parameter undo;
查看闪回保存时间(秒)
3.alter system set undo_retention=n ; n(
整数秒) 保存时间越长,需要空间支持越多
4.select * from tablename as of timestamp to_timestamp('2013-05-22 14:53:00','yyyy-mm-dd hh24:mi:ss') ;
查询某一个时间点时的数据
5.select * from tablename as of scn n;
根据scn(system change number)来查询某一时间点的数据
6.select to_char('2013-05-22 14:56:00', 'yyyy-mm-dd hh24:mi:ss') time, to_char(dbms_flashback.get_system_change_number) scn from dual;
查询该时间段的数据和scn号
7. create table tablename as select * from tablename as of timestamp to_timestamp('2013-05-22 14:53:00','yyyy-mm-dd hh24:mi:ss')
把某一时间点的数据放到一张新的表中
8.
把目标表清空,然后把某一时间点的数据insert到目标表当中

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

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

注册时间:2013-05-23

  • 博文量
    21
  • 访问量
    47439