当表空间不足时Oracle管理Recyclebin
2008-08-26 12:44:02 来源:WEB开发网我们知道,在Oracle 10g中,drop table如果没有加 purge选项.实际数据并没有删除,因而没有释放表空间.
那么当被删除的对象占用了所有空间时,会发生什么? 相信看完以下测试,一切皆会明白
YXYUP@dbatest>selecttablespace_name,sum(bytes)/1024/1024fromdba_data_fileswheretablespace_name='TBS'groupbytablespace_name;
TABLESPACE_NAMESUM(BYTES)/1024/1024
----------------------------------------
TBS17
Elapsed:00:00:00.02
YXYUP@dbatest>selectsegment_name,bytes/1024/1024,tablespace_namefromuser_segments;
SEGMENT_NAMEBYTES/1024/1024TABLESPACE_NAME
-----------------------------------------------------------------
TEST_BAK6TBS
TEST016TBS
Elapsed:00:00:00.07
YXYUP@dbatest>createtabletest02tablespacetbsasselect*fromdba_objects;
createtabletest02tablespacetbsasselect*fromdba_objects
*
ERRORatline1:
ORA-01652:unabletoextendtempsegmentby128intablespaceTBS
Elapsed:00:00:00.73
YXYUP@dbatest>droptabletest01;
Tabledropped.
Elapsed:00:00:00.04
YXYUP@dbatest>showrecyclebin;
ORIGINALNAMERECYCLEBINNAMEOBJECTTYPEDROPTIME
-----------------------------------------------------------------------------
TEST01BIN$VPH4ibnKVd/gQAB/AQA0Nw==$0TABLE2008-08-21:14:56:55
YXYUP@dbatest>
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
BIN$VPH4ibnKVd/gQAB/AQA0Nw==$0TABLE
TEST_BAKTABLE
Elapsed:00:00:00.01
YXYUP@dbatest>createtabletest02tablespacetbsasselect*fromdba_objects;
Tablecreated.
Elapsed:00:00:00.84
YXYUP@dbatest>showrecyclebin;
YXYUP@dbatest>select*fromtab;
TNAMETABTYPECLUSTERID
-----------------------------------------------
TEST_BAKTABLE
TEST02TABLE
Elapsed:00:00:00.01
- ››oracle 恢复误删除的表和误更新的表
- ››Oracle分页查询排序数据重复问题
- ››Oracle创建dblink报错:ORA-01017、ORA-02063解决
- ››Oracle 提高SQL执行效率的方法
- ››Oracle 动态查询,EXECUTE IMMEDIATE select into...
- ››Oracle 11g必须开启的服务及服务详细介绍
- ››oracle性能34条优化技巧
- ››oracle数据库生成随机数的函数
- ››Oracle 数据库表空间容量调整脚本
- ››oracle单库彻底删除干净的方法
- ››Oracle创建表空间、创建用户以及授权、查看权限
- ››oracle 中 UPDATE nowait 的使用方法
更多精彩
赞助商链接