• Oracle误删表的恢复


    利用ORACLE闪回机制,将删除的表闪回回来

    找到回收站里删掉的表

    select * from user_recyclebin where DROPTIME >'2012-02-22 00:00:00'; 

    在闪之前, 但删除的表,如果又重新创建了一样的表名,所以不能直接闪回,要先删除这些表, (如需删除冲突表,执行此以下查询结果内容中的sql语句) 

    select 'drop table '||ORIGINAL_NAME||' cascade constraint;' from user_recyclebin where DROPTIME >'2010-02-08 09:00:00' and type = 'TABLE'; 

    ( 生成闪回表的语句  )

    select 'flashback table '||ORIGINAL_NAME||' to before drop;' from user_recyclebin where DROPTIME >'2012-02-22 17:00:00' and type = 'TABLE'; 


    (索引恢复)

    select 'ALTER INDEX "'||OBJECT_NAME||'" rename to '||ORIGINAL_NAME||';'  from user_recyclebin where DROPTIME >'2012-02-22 17:00:00' and type = 'INDEX';


    (触发器恢复)

    select 'ALTER TRIGGER "'||OBJECT_NAME||'" rename to '||ORIGINAL_NAME||';'  from user_recyclebin where DROPTIME >'2012-02-22 17:00:00' and type = 'TRIGGER';



     

     

  • 相关阅读:
    推送
    XPath
    XML
    在xcode 6.4 环境下写的demo 在xode7 环境下 网络请求有问题
    SVN 搭建
    翻译
    iOS面试题积累
    安卓扁平化之路专题(三)Android 5.0新特性
    Android @SuppressLint @TargetApi 总结
    Android_support_v4,Android_support_v7,Android_support_v13区别
  • 原文地址:https://www.cnblogs.com/huangzhen/p/2364340.html
Copyright © 2020-2023  润新知