清除recycle bin中的对象

当Recycle Bin处于启用状态时,如果用户对表执行DROP操作,则被删除的表及其关联的对象就会被罢入Recycle Bin中。

对于这种方式删除的表,可以快速地通过Flashback Drop的方式进行恢复。


EODA@PROD1> show recyclebin
ORIGINAL NAME	 RECYCLEBIN NAME		OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------
ORDERS		 BIN$QQuMa/ZLGlXgU0edqMAw4g==$0 TABLE	     2016-11-12:03:32:19
RES		 BIN$QQuMa/ZMGlXgU0edqMAw4g==$0 TABLE	     2016-11-12:03:35:26
T		 BIN$QQbacGLNDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:22
T		 BIN$QQbacGLMDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:20
T		 BIN$QQbacGLLDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:18
EODA@PROD1> purge table ORDERS;  --指定表名

Table purged.

EODA@PROD1> show recyclebin
ORIGINAL NAME	 RECYCLEBIN NAME		OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------
RES		 BIN$QQuMa/ZMGlXgU0edqMAw4g==$0 TABLE	     2016-11-12:03:35:26
T		 BIN$QQbacGLNDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:22
T		 BIN$QQbacGLMDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:20
T		 BIN$QQbacGLLDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:18
EODA@PROD1> purge table "BIN$QQbacGLNDzbgU0edqMDeBA==$0";  --指定被更改后的名字

Table purged.

EODA@PROD1> show recylebin
SP2-0158: unknown SHOW option "recylebin"
EODA@PROD1> show recyclebin
ORIGINAL NAME	 RECYCLEBIN NAME		OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------
RES		 BIN$QQuMa/ZMGlXgU0edqMAw4g==$0 TABLE	     2016-11-12:03:35:26
T		 BIN$QQbacGLMDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:20
T		 BIN$QQbacGLLDzbgU0edqMDeBA==$0 TABLE	     2016-11-11:21:56:18
EODA@PROD1> purge recyclebin;  --清除所有

Recyclebin purged.

EODA@PROD1> show recyclebin 
EODA@PROD1> 


你可能感兴趣的:(Oracle,Basic,Principle)