ORA-14270: table is not partitioned by Range, System, Hash or List method ORACLE 报错 故障修复 远程处理

文档解释

ORA-14270: table is not partitioned by Range, System, Hash or List method

Cause: The table in ALTER TABLE MODIFY PARTITION { UNUSABLE LOCAL INDEXES | REBUILD UNUSABLE LOCAL INDEXES } statement is not partitioned by Range,List,System, or Hash method which is illegal.

Action: Ensure that the table is partitioned by Range,List,System, or Hash method

ORA-14270 错误指示表没有按照Range(范围),System(系统),Hash(散列)或List(列表)方法进行分区。

官方解释

ORA-14270 表没有按照有效的分区方法进行分区。在Oracle中,只能使用以下分区策略:Range(范围),System(系统),Hash(散列)或List(列表)。

常见案例

某个表没有按照Range, System, Hash or List分区策略进行分区,则会导致上述ORA-14270错误;

正常处理方法及步骤

(1)检查表是否已分区:select * from user_tab_partitions;

(2)查看表是否按照符合的分区策略:select * from user_part_tables;

(3)如果表没有分区,可以使用ALTER TABLE语句按Range(范围),System(系统),Hash(散列)或List(列表)方法进行分区。

(1)建立分区函数:

CREATE FUNCTION partition_range_func (PN VARCHAR2)

RETURN NUMBER

PARALLEL_ENABLE AGGREGATE USING

case

when PN=’VIP’ THEN 1

when PN=’Normal’ THEN 2

else 3

end;

(2)建立分区表:

CREATE TABLE Pay_table (Pay_ID number,Pay_Name,Varchar2(20))

PARTITION BY RANGE (partition_range_func(Pay_Name))

(PARTITION p1_VIP VALUES LESS THAN (1),

PARTITION p2_normal VALUES LESS THAN (2),

PARTITION p3_other VALUES LESS THAN (MAXVALUE));


数据运维技术 » ORA-14270: table is not partitioned by Range, System, Hash or List method ORACLE 报错 故障修复 远程处理