ORA-10631: SHRINK clause should not be specified for this object

来源:互联网 发布:免费网络存储 编辑:程序博客网 时间:2024/06/05 18:43

ORA-10631: SHRINK clause should not be specified for this object

查询得知shrink的使用有很多限制,限制如下:

Shrink operations can be performed only on segments in locally managed tablespaces with automatic segment space management (ASSM). Within an ASSM tablespace, all segment types are eligible for online segment shrink except these:
■ IOT mapping tables
■ Tables with rowid based materialized views
■ Tables with function-based indexes    
■ SECUREFILE LOBs
■ Compressed tables

老外说的太别扭,个人翻译如下:
Shrink 操作需满足表空间是本地管理和自动段空间管理(10g、11g默认就是这样),以下情况不能用shrink:
IOT索引组织表
用rowid创建的物化视图的基表
带有函数索引的表
SECUREFILE 大对象
压缩表

检查traderecode的索引果然有函数索引,所以导致报了ORA-10631错误。

近来发现oracle的新特性总是有些局限或缺陷,例如今天碰上的Shrink,以上就是它的缺陷。

相比alter table move,Shrink的进步是:
1.可在线执行
2.可使用参数cascade,同时收缩表上的索引
3.执行后不会导致索引失效
4.可避免alter table move执行过程中占用很多变空间(如果表10G大小,那alter table move差不多还得需要10G空间才能执行)。

0 0
原创粉丝点击