ORA-14253: table is not partitioned by Composite Range method

文档解释

ORA-14253: table is not partitioned by Composite Range method

Cause: The table in a subpartition maintenance operation (ALTER TABLE EXCHANGE/MODIFY/MOVE/TRUNCATE SUBPARTITION, or ALTER TABLE MODIFY PARTITION ADD/COALESCE SUBPARTITION command must be partitioned by Composite Range method

Action: Ensure that the table is partitioned by Composite Range method

,给出示例

ORA-14253:表没有使用组合范围方法进行分区。

官方解释

ORA-14253: 表没有使用任何组合范围的分区方法,以便在分区表上执行某些操作。

常见案例

当您尝试使用以下SQL语句对分区表进行操作时,就会遇到ORA-14253的错误:

ALTER TABLE

TRUNCATE PARTITION ;

正常处理方法及步骤

1.获取要操作的表分区方法:

SELECT PARTITION_METHOD FROM DBA_TAB_PARTITIONS

WHERE TABLE_NAME = ‘

‘;

2. 若没有找到,则检查表分区语句:

SELECT DBMS_METADATA.GET_DDL( ‘TABLE’, ‘

‘)

FROM dual;

3. 找出表分区方法,并确认它是否使用了COMPOSITE RANGE方法。

CREATE TABLE

( … )

PARTITION BY RANGE(column_name)

(

PARTITION part_name VALUES LESS THAN (value1)

…)

COMPOSITE RANGE

(PARTITION cmp_part1 VALUES LESS THAN (value2),

PARTITION cmp_part2 VALUES LESS THAN (value321))

( … )

4. 若分区不是使用COMPOSITE RANGE,则更改表的分区方式,使其使用COMPOSITE RANGE分区

示例:

ALTER TABLE

REORGANIZE PARTITION

INTO (

PARTITION part_name VALUES LESS THAN (value1),

… )

COMPOSITE RANGE (PARTITION cmp_part1 VALUES LESS THAN (value2),

PARTITION cmp_part2 VALUES LESS THAN (value3))

… ;

你可能感兴趣的