当表空间不足时Oracle管理Recyclebin
2008-08-26 12:44:02 来源:WEB开发网上面测试可以看出,当表空间空闲空间不足时,Oracle就会将recyclebin中的表给彻底删除,然后腾出空间来放要创建的新对象.
那么,如果recyclebin中有多个被drop的对象时,Oracle会怎么清理呢,是全部清除,还是怎样? 通过下面的测试我们行到答案.
YXYUP@dbatest>showrecyclebin;
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
TEST_BAKTABLE
TEST02TABLE
Elapsed:00:00:00.01
YXYUP@dbatest>droptabletest02;
Tabledropped.
Elapsed:00:00:00.04
YXYUP@dbatest>droptabletest_bak;
Tabledropped.
Elapsed:00:00:00.02
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
BIN$VPH4ibnLVd/gQAB/AQA0Nw==$0TABLE
BIN$VPH4ibnMVd/gQAB/AQA0Nw==$0TABLE
Elapsed:00:00:00.01
YXYUP@dbatest>showrecyclebin;
ORIGINALNAMERECYCLEBINNAMEOBJECTTYPEDROPTIME
-----------------------------------------------------------------------------
TEST02BIN$VPH4ibnLVd/gQAB/AQA0Nw==$0TABLE2008-08-21:15:14:43
TEST_BAKBIN$VPH4ibnMVd/gQAB/AQA0Nw==$0TABLE2008-08-21:15:14:51
YXYUP@dbatest>createtabletest01tablespacetbsasselect*fromdba_objects;
Tablecreated.
Elapsed:00:00:00.79
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
BIN$VPH4ibnMVd/gQAB/AQA0Nw==$0TABLE
TEST01TABLE
Elapsed:00:00:00.01
YXYUP@dbatest>flashbacktableTEST02tobeforedrop;
flashbacktableTEST02tobeforedrop
*
ERRORatline1:
ORA-38305:objectnotinRECYCLEBIN
Elapsed:00:00:00.00
YXYUP@dbatest>flashbacktableTEST_BAKtobeforedrop;
Flashbackcomplete.
Elapsed:00:00:00.02
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
TEST_BAKTABLE
TEST01TABLE
Elapsed:00:00:00.01
通过上面测试可以看出.
当recyclebin中有多个被删除的同时,并在表空间不足以放下要创建的新对象时,Oracle会FIFO的方式从回收站中自动彻底删除.
赞助商链接