您的位置:首页 > 数据库 > Oracle

oracle 10g的闪回删除与回收站

2012-05-23 10:16 411 查看
闪回删除与回收站的简介





1.正常情况下删除一个表

drop table test1

这是表会被放置在recyclebin(回收站)

注意:这里如果执行了“commit”提交操作。下列闪回操作就会失效!

2.使用如下代码进行闪回操作

flashback table test1 to before drop

3.使用函数 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;

7.清空回收站的操作

purge recyclebin;

8.显示回收站的内容

show recyclebin

本文出自 “交流群“143420878”” 博客,请务必保留此出处http://donghao123.blog.51cto.com/4879169/873995
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: