如何改变LOCAL分区索引?

时间:2018-02-08 12:48:57

标签: oracle indexing partition

我已经在生产中运行了这个脚本:

CREATE INDEX WZAQXS1A
ON WZAQTS1(PRO_PARTITION)
local
( PARTITION part_WZAQXS1A_74 tablespace wz0qdix1_74
, PARTITION part_WZAQXS1A_76 tablespace wz0qdix1_76
, PARTITION part_WZAQXS1A_77 tablespace wz0qdix1_77
, PARTITION part_WZAQXS1A_78 tablespace wz0qdix1_78
, PARTITION part_WZAQXS1A_7D tablespace wz0qdix1_7D
, PARTITION part_WZAQXS1A_7J tablespace wz0qdix1_7J
, PARTITION part_WZAQXS1A_81 tablespace wz0qdix1_81
, PARTITION part_WZAQXS1A_82 tablespace wz0qdix1_82
, PARTITION part_WZAQXS1A_85 tablespace wz0qdix1_85
, PARTITION part_WZAQXS1A_858 tablespace wz0qdix1_858
, PARTITION part_WZAQXS1A_859 tablespace wz0qdix1_859
, PARTITION part_WZAQXS1A_88 tablespace wz0qdix1_88
, PARTITION part_WZAQXS1A_89 tablespace wz0qdix1_89
, PARTITION part_WZAQXS1A_89M tablespace wz0qdix1_89M
, PARTITION part_WZAQXS1A_8E tablespace wz0qdix1_8E
, PARTITION part_WZAQXS1A_CA tablespace wz0qdix1_CA
, PARTITION part_WZAQXS1A_CC tablespace wz0qdix1_CC
, PARTITION part_WZAQXS1A_CH tablespace wz0qdix1_CH
, PARTITION part_WZAQXS1A_CJ tablespace wz0qdix1_CJ
, PARTITION part_WZAQXS1A_CP tablespace wz0qdix1_CP
, PARTITION part_WZAQXS1A_CS tablespace wz0qdix1_CS
, PARTITION part_WZAQXS1A_CX tablespace wz0qdix1_CX
, PARTITION part_WZAQXS1A_FL tablespace wz0qdix1_FL
, PARTITION part_WZAQXS1A_FT tablespace wz0qdix1_FT
, PARTITION part_WZAQXS1A_FV tablespace wz0qdix1_FV
, PARTITION part_WZAQXS1A_FW tablespace wz0qdix1_FW
, PARTITION part_WZAQXS1A_U9 tablespace wz0qdix1_U9
, PARTITION part_WZAQXS1A_UW tablespace wz0qdix1_UW
, PARTITION part_WZAQXS1A_UX tablespace wz0qdix1_UX
, PARTITION part_WZAQXS1A_YN tablespace wz0qdix1_YN
, PARTITION part_WZAQXS1A_72 tablespace WZ0QDIX1_72
, PARTITION part_WZAQXS1A_KI tablespace WZ0QDIX1_KI
);

我想为它添加一个新分区

我尝试使用以下脚本

alter index 
   WZAQXS1A 
add partition 
   part_WZAQXS1A_KI 
tablespace 
   WZ0QDIX1_KI;

但它给了我这个错误:

  

ORA-14076:提交的alter index partition / subpartition操作对本地分区索引无效   14076. 00000 - “提交的alter index partition / subpartition操作对本地分区索引无效”   *原因:用户试图删除,拆分,添加或合并分区或              本地索引的子分区是非法的。   *操作:确保此类语句中指定的索引是全局索引              分区索引。

如何添加新分区'KI'?

1 个答案:

答案 0 :(得分:1)

您无法将分区添加到本地索引。在上添加(或拆分)分区,然后将自动创建索引分区。

新分区将存储在默认表空间中,您可以通过

进行设置
ALTER INDEX WZAQXS1A MODIFY DEFAULT ATTRIBUTES TABLESPACE WZ0QDIX1_KI;

或者您可以在之后移动索引分区,如

ALTER INDEX WZAQXS1A REBUILD PARTITION part_WZAQXS1A_KI TABLESPACE WZ0QDIX1_KI;