随笔 - 32, 文章 - 1, 评论 - 5, 引用 - 0
数据加载中……

[数据库]Oracle释放磁盘空间

--查看当前系统版本--
SQL> select * from v$version;
 
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL
/SQL Release 11.1.0.6.0 - Production
CORE    
11.1.0.6.0    Production
TNS 
for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 
11.1.0.6.0 - Production

--查看数据表占用磁盘空间--
SQL> select segment_name,segment_type,bytes,blocks,extents from user_segments where segment_name='T_FUSE_SEPARATE_SESSION_H_TEMP';
 
SEGMENT_NAME                                                                     SEGMENT_TYPE            BYTES     BLOCKS    EXTENTS
-------------------------------------------------------------------------------- ------------------ ---------- ---------- ----------
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
T_FUSE_SEPARATE_SESSION_H_TEMP                                                   
TABLE PARTITION        131072         16          1
 
12 rows selected

SQL
> truncate table T_FUSE_SEPARATE_SESSION_H_TEMP;

--清除空间--
SQL> alter table T_FUSE_SEPARATE_SESSION_H_TEMP move;
 
alter table T_FUSE_SEPARATE_SESSION_H_TEMP move
 
ORA
-14511: 不能对分区对象进行操作

--直接删除表--
SQL> drop table T_FUSE_SEPARATE_SESSION_H_TEMP;
 
Table dropped
 
SQL
> commit;
 
Commit complete

--重启数据库--
SQL> shutdown immediate;
#lsnrctl start
#sqlplus 
/nolog
SQL
> connect /as sysdba;
SQL
> startup;

posted on 2010-08-25 10:07 colorfire 阅读(1628) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: