ORA-14291: cannot EXCHANGE a composite partition with a non-partitioned table

文档解释

ORA-14291: cannot EXCHANGE a composite partition with a non-partitioned table

Cause: A composite partition can only be exchanged with a partitioned table.

Action: Ensure that the table being exchanged is partitioned or that that the partition being exchanged is non-composite.

ORA-14291:不能用非分区表交换复合分区

官方解释

Oracle 数据库报告 ORA-14291 错误,因为不能使用 ALTER TABLE … EXCHANGE PARTITION 子句将复合分区交换给非分区表。

常见案例

下面语句出现 ORA-14291 错误:

ALTER TABLE nonpart_table EXCHANGE PARTITION partition_name WITH TABLE part_table;

正常处理方法及步骤

以下子句正确:

ALTER TABLE part_table EXCHANGE PARTITION partition_name WITH TABLE nonpart_table ;

要交换复合分区与非分区表,应先分区非分区表,然后再进行交换操作:

ALTER TABLE nonpart_table (分区)EXCHANGE PARTITION partition_name WITH TABLE part_table;

你可能感兴趣的