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


sys@GHSJDB> alter table "GHSJ_JCSJ"."T_PWZY_FHKG" shrink space;
alter table "GHSJ_JCSJ"."T_PWZY_FHKG" shrink space
*
ERROR at line 1:
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 大对象
压缩表

--删除函数索引

drop index ghsj_jcsj.T_PWZY_FHKG_IDX$$_6B680073;

 

--重新执行

sys@GHSJDB> alter table "GHSJ_JCSJ"."T_PWZY_FHKG" shrink space;

Table altered.

--创建索引

create index ghsj_jcsj.T_PWZY_FHKG_IDX$$_6B680073 on ghsj_jcsj.T_PWZY_FHKG(TO_CHAR(TYNF,'yyyy'));

 

本文乃原创文章,请勿转载。如须转载请详细标明转载出处

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值