Saturday, July 24, 2010

ORA-14080: partition cannot be split along the specified high bound

Problem Scenarios
SQL>    CREATE TABLE USER_ACTIVITY
2 (
3 COL1 NUMBER NOT NULL,
4 COL2 VARCHAR2(10) NULL,
5 COL3 NUMBER NOT NULL
6 )
7 TABLESPACE USERS
8 PARTITION BY RANGE (COL3)
9 (
10 PARTITION P10 VALUES LESS THAN (100),
11 PARTITION P20 VALUES LESS THAN (200),
12 PARTITION P_MAX VALUES LESS THAN (MAXVALUE)
13 );

Table created.

SQL> ALTER TABLE USER_ACTIVITY SPLIT PARTITION
2 P_MAX AT (200)
3 INTO
4 (
5 PARTITION P30,
6 PARTITION MAXPART
7 );
P_MAX AT (200)
*
ERROR at line 2:
ORA-14080: partition cannot be split along the specified high bound

Cause of the Problem
There is already a partition with a specified high bound of 200. You need to split the partition on a value higher than the next range down but lower that the next range up.

Solution of the Problem
The solution is to split the partition into appropriate bound. The following statement will split the partition at value 250. From the two, the first partition (P30) holding values 200
to 249 and the second partition (MAXPART) holding values 250 and above.

SQL> ALTER TABLE USER_ACTIVITY SPLIT PARTITION
2 P_MAX AT (250)
3 INTO
4 (
5 PARTITION P30,
6 PARTITION MAXPART
7 );

Table altered.

No comments:

Post a Comment