闪回删除与回收站的简介
1.正常情况下删除一个表
drop table test1
这是表会被放置在recyclebin(回收站)
注意:这里如果执行了“commit”提交操作。下列闪回操作就会失效!
2.使用如下代码进行闪回操作
flashback table test1 to before drop
3.使用函数 to_timestamp 将表闪回但是到一个确切的时间点是的状态
如:
允许行滚动
alter table test1 enable row movement;
执行闪回操作
flashback table test1 to timestamp to_timestamp(‘2012-05-22 09:19:51’,’YYYY-MM-DD HH24:MI:SS’);
4.当回收站中具有多个原始名称时。
(1)一种是使用系统为所删除的表所起的名称还原特定版本
(2)使用原始名称时,还原的表遵循后进先出(lifo)的规则
5.对回收站中的表进行闪回并且重命名。
flashback table test1 to before drop rename to testnews ;
6.不使用回收站
drop table test1 purge;
drop tablespace users including contents;
drop user scott cascade;