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