熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

Oracle誤刪恢復

2013-11-13 12:48:51  來源: Oracle 

  Oracle誤刪恢復

  query deleted datarows:

  select * from 表名 as of timestamp to_timestamp(刪除時間點yyyymmdd hh:mi:ss)

  //Needs Auth [flash any table]

  data table flashback:

  alter table 表名 enable row movement;

  //then

  flashback table 表名 to timestamp to_timestamp(刪除時間點yyyymmdd hh:mi:ss);

  database flashback:

  alter database flashback on

  flashback database to scn SCNNO;

  flashback database to timestamp to_timestamp( ::yyyymmdd hh:mi:ss);

  query droped tables;

  select table_namedropped from user_tables

  select object_nameoriginal_nametypedroptime from user_recyclebin

  restore droped table:

  flashback table 原表名 to before drop

  flashback table 回收站中的表名(如Bin$DSbdfdrdfdfdfegdfsf==$) to before drop rename to 新表名

  不使用安全機制delete/drop時直接釋放空間purge(淨化)

  drop table 表名 purge

  刪除表

  drop table emp cascade constraints

  purge table emp;

  刪除當前用戶的回收站:

  purge recyclebin;

  刪除所有用戶在回收站:

  purge dba_recyclebin


From:http://tw.wingwit.com/Article/program/Oracle/201311/16620.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.