Oracle误删恢复

query deleted datarows:
	select * from 表名 as of timestamp to_timestamp('删除时间点','yyyy-mm-dd hh24:mi:ss')
	
//Needs Auth [flash any table]
	data table flashback:
   alter table 表名 enable row movement;
   //then
   flashback table 表名 to timestamp to_timestamp(删除时间点','yyyy-mm-dd hh24:mi:ss');
   
database flashback:
	alter database flashback on
	flashback database to scn SCNNO;
	flashback database to timestamp to_timestamp('2007-2-12 12:00:00','yyyy-mm-dd hh24:mi:ss');
	
query droped tables;
	select table_name,dropped from user_tables
	select object_name,original_name,type,droptime from user_recyclebin   
	
restore droped table:
	flashback table 原表名 to before drop
	flashback table "回收站中的表名(如:Bin$DSbdfd4rdfdfdfegdfsf==$0)" to before drop rename to 新表名

不使用安全机制,delete/drop时直接释放空间,purge(净化)
	drop table 表名 purge
     
删除表
	drop table emp cascade constraints
	purge table emp;
删除当前用户的回收站:
    purge recyclebin;
删除所有用户在回收站:
	purge dba_recyclebin


原文地址:https://www.cnblogs.com/riskyer/p/3217668.html