ORACLE10204
PK_CUSTPSI_MANY_BEF_PART 是主键约束PK_CUSTPSI_MANY_BEF_PART 的索引(约束与索引同名),是个分区索引,现想把
该索引中2005年的索引作压缩,但无法实现?
MARKETING@retail>select compression from user_indexes where index_name='PK_CUSTPSI_MANY_BEF_PART';
COMPRESS
--------
DISABLED
Elapsed: 00:00:00.04
MARKETING@retail>select index_owner,index_name,partition_name,compression from dba_ind_partitions
2 where tablespace_name='CPSI_COMPRESS_IDX_2005' order by 1,2,3;
INDEX_OWNER INDEX_NAME PARTITION_NAME COMPRESS
------------------------------ ------------------------------ ------------------------------ --------
...
MARKETING IDX_CUSTPSI_MANY_BEF_PART_SOP4 PART_200511 ENABLED
MARKETING IDX_CUSTPSI_MANY_BEF_PART_SOP4 PART_200512 ENABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200501 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200502 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200503 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200504 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200505 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200506 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200507 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200508 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200509 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200510 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200511 DISABLED
MARKETING PK_CUSTPSI_MANY_BEF_PART PART_200512 DISABLED
...
MARKETING@retail>alter index PK_CUSTPSI_MANY_BEF_PART modify partition PART_200512 compress;
alter index PK_CUSTPSI_MANY_BEF_PART modify partition PART_200512 compress
*
ERROR at line 1:
ORA-28659: COMPRESS must be specified at object level first
Elapsed: 00:00:00.14
MARKETING@retail>alter index PK_CUSTPSI_MANY_BEF_PART modify default attributes for partition PART_200512 compress;
alter index PK_CUSTPSI_MANY_BEF_PART modify default attributes for partition PART_200512 compress
*
ERROR at line 1:
ORA-02243: invalid ALTER INDEX or ALTER MATERIALIZED VIEW option
Elapsed: 00:00:00.01
MARKETING@retail>alter index PK_CUSTPSI_MANY_BEF_PART compress;
alter index PK_CUSTPSI_MANY_BEF_PART compress
*
ERROR at line 1:
ORA-02243: invalid ALTER INDEX or ALTER MATERIALIZED VIEW option
Elapsed: 00:00:00.01
MARKETING@retail>alter index PK_CUSTPSI_MANY_BEF_PART rebuild partition PART_200512 compress;
alter index PK_CUSTPSI_MANY_BEF_PART rebuild partition PART_200512 compress
*
ERROR at line 1:
ORA-28659: COMPRESS must be specified at object level first
Elapsed: 00:00:00.01
是我命令没写对,还是ORACLE不提供此功能,得删除索引重建时定义此属性?