本帖最后由 OhMyGod0512 于 2011-12-14 14:03:22 编辑

解决方案 »

  1.   

    我以前用过的一个方法  你是中午发的贴 。昨天删的 不知道还来得及不 。数据库的开归档才可以。具体的示例如下:--利用ORACLE数据库的SCN进行恢复,ORACLE数据库每隔5分钟,系统会产生一个系统时间标记与scn的匹配并存入sys.smon_scn_time表中。--我们对这个备份机制做如下测试--查询出来数据
    select t.*, t.rowid from account t where id >10000 order by t.id asc;--删掉数据
    delete from account c where c.id >10000;--查询出ORACLE数据库中的scn与时间的对应关系
    select * from sys.smon_scn_time order by time_dp desc;--根据数据取得删除时间段对应的SCN号,这里是1693760, 查看这个检查点的account表的历史情况
    select * from account as of scn 1693760;-- 将account表复制一个,(这里表的关联关系需要另外处理),命名为account_new 。
    create table account_new as select * from account where 1<>1--将删掉的数据库从这个检查点恢复到新表account_new中。
    insert into account_new (select * from account as of scn 1693760);--查询恢复后的结果。
    select * from account_new;--- 此方法的最佳恢复时间越短越好,如果超过了24个小时,恢复的可能性就很小了。
      

  2.   


    flashback query使用的是undo 数据,除非是测试环境空转,否则不会保留12个小时以上的
    你这个想法可以,但是时间是个问题
      

  3.   

    如果数据库运行在archivelog模式,建议问你同事什么时候整出的事情,然后去用logminer挖对应时间的归档日志,把里面的undo_sql挖出来跑一下