oracle ora 10635,ORA-10635: Invalid segment or tablespace type | 学步园

上周星期天在迁移数据时,碰到了ORA-10635: Invalid segment or tablespace type 错误,当时的操作环境如下:

操作系统版本:

[oracle@xxxxx scripts]$ more /etc/issue

Red Hat Enterprise Linux ES release 4 (Nahant Update 6)

数据库版本  :

SQL> select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Release 10.2.0.4.0 - Production

PL/SQL Release 10.2.0.4.0 - Production

CORE    10.2.0.4.0      Production

TNS for Linux: Version 10.2.0.4.0 - Production

NLSRTL Version 10.2.0.4.0 - Production

把一批表2011年的数据迁移到历史表归档时,由于是DELETE操作,为了降低这批表的高水位线,执行下面操作。

ALTER TABLE TABLE_NAME ENABLE ROW MOVEMENT ;

ALTER TABLE TABLE_NAME SHRINK SPACE;

结果报如下错误:

53ffff36679c1475aa9d98bcfa926607.png

ORA-10635: Invalid segment or tablespace type

检查这些表的表空间的EXTENT_MANAGEMETN的值,发现它是本地管理

SELECT TABLESPACE_NAME, EXTENT_MANAGEMENT FROM DBA_TABLESPACES WHERE TABLESPACE_NAME= 'TABLESPACE_NAME'

------------------------------------------------------------------------

xxxxxxx        LOCAL

从10g开始,ORACLE开始提供Shrink的命令,假如我们的表空间中支持自动段空间管理 (ASSM),就可以使用这个特性缩小段,即降低HWM。这里需要强调一点,10g的这个新特性,仅对ASSM表空间有效,否则会报 ORA-10635: Invalid segment or tablespace type。

其实会导致这个错误的原因还有其它一些:

1. You cannot specify this clause for a cluster, a clustered table, or any object with a LONG column.

2. Segment shrink is not supported for tables with function-based indexes or bitmap join indexes.

3. This clause does not shrink mapping tables of index-organized tables,even if you specify CASCADE.参见后面的测试

4. You cannot specify this clause for a compressed table.

5. You cannot shrink a table that is the master table of an ON COMMIT materialized view. Rowid materialized views must be rebuilt after the shrink operation.

1. 对cluster,cluster table,或具有Long类型列的对象不起作用。

2. 不支持具有function-based indexes 或 bitmap join indexes的表

3. 不支持mapping 表或index-organized表。

4. 不支持compressed 表

5: 不支持是ON COMMIT物化视图中的主表

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值