ORA-14639: SUBPARTITIONS clause can be specfied only for Hash, Composite Range Hash table/partition ORACLE 报错 故障修复 远程处理
文档解释
ORA-14639: SUBPARTITIONS clause can be specfied only for Hash, Composite Range Hash table/partition
Cause: Attempted to specify SUBPARTITIONS clause on table that is not partitioned by the Composite Range-Hash method
Action: Reissue the command after ensuring that the SUBPARTITIONS clause is not specified, to specify a template for a Composite Range List object use the SUBPARTITION TEMPLATE clause
官方解释
常见案例
当在建立哈希、综合型范围型和哈希分区表时,使用SUBPARTITIONS字句就可能出现ORA-14639错误。例如:
创建表:
CREATE TABLE orders
(order_id NUMBER(20),
order_date DATE,
SUBPARTITIONS 4
)
PARTITION BY RANGE (order_date)
(PARTITION p1 VALUES LESS THAN (’01-JAN-2018′));
当执行上述语句时,就会报 ORA-14639错误。
正常处理方法及步骤
1. 若要将表分区化,就不能使用SUBPARTITIONS字句,而要使用SUBPARTITION字句去创建有多种子分区的分区表。
2. 创建子分区的语句:
SUBPARTITION BY HASH (order_id)
SUBPARTITIONS 4
例如:
CREATE TABLE orders
(order_id NUMBER(20),
order_date DATE
)
PARTITION BY RANGE (order_date)
(PARTITION p1 VALUES LESS THAN (’01-JAN-2018′)
SUBPARTITION BY HASH (order_id)
SUBPARTITIONS 4
);