ORA-30759: nested table cannot be partitioned for a composite partitioned base table
Cause: The user specifed local or nested table parameters inside partition clause for a composite partitioned table.
Action: Issue the DDL without nested table partition clauses for composite partitioned table.
ORA-30759:嵌套表不能用于分区组合基表,这是一个系统错误,意思是不能在分区组合基表上分区嵌入表,嵌套表不过只能支持全局分区表。
由ORA-30759导致的错误出现在试图在分区组合基表上分区嵌入表时。ORA-30759:nested table不能为组合分区基表使用。 大多数分区情况要求表是全局分区,但有时用户忘记此要求或在将分区子表创建为嵌套表时执行错误操作。
创建一个分区组合基表以供分区表中的嵌套表使用:
CREATE TABLE
Employee (
emp_id NUMBER,
name VARCHAR2(100),
salary NUMBER
)
PARTITION BY LIST (salary)
(
PARTITION p_low VALUES (1000, 2000),
PARTITION p_high VALUES (3000, 5000)
);
1. 将嵌套表改为全局分区表:
ALTER TABLE employee MODIFY GLOBAL PARTITION BY RANGE (emp_id)
( PARTITION p1 VALUES LESS THAN (10000) );
2. 将分区组合表重新改为子分区表:
ALTER TABLE employee MODIFY SUBPARTITION BY RANGE (salary)
( SUBPARTITION p_low VALUES LESS THAN (1000 , 2000) ,
SUBPARTITION p_high VALUES LESS THAN (3000, 5000) );