ORA-14606: Tablespace was specified for previous subpartitions in template but is not specified for string ORACLE 报错 故障修复 远程处理

文档解释

ORA-14606: Tablespace was specified for previous subpartitions in template but is not specified for string

Cause: Tablespaces may either be specified for all subpartitions or must not be specified for any subpartitions

Action: Either specify tablespaces for all or for none of the subpartitions

这是一个ORACLE数据库的错误信息,它表明您尝试在模板中为某一附件子分区( Subpartitions )指定表空间,但遗漏在另一附件子分区中指定了该表空间。

官方解释

ORA-14606发生,当使用CREATE TABLE … SUBPARTITION TEMPLATE子句构建子分区模板时,Oracle检查显式地指定了前一个子分区的表空间,但没有在该模板中其他子分区引用相同的表空间时。

常见案例

例如,下面显示在使用模板创建分区表时可能会发生ORA-14606错误的情况:

CREATE TABLE SALES_HISTORY

(… other columns)

PARTITION BY RANGE (SALE_DATE)

SUBPARTITION BY LIST (SALE_LOCATION)

SUBPARTITION TEMPLATE

(SUBPARTITION SALES_EAST_01 VALUES (‘EAST’) TABLESPACE TS_EAST,

SUBPARTITION SALES_WEST_01 VALUES (‘WEST’) );

正常处理方法及步骤

1、修改语句,将相同的表空间指定给后续子分区,避免出现ORA-14606错误:

CREATE TABLE SALES_HISTORY

(… other columns)

PARTITION BY RANGE (SALE_DATE)

SUBPARTITION BY LIST (SALE_LOCATION)

SUBPARTITION TEMPLATE

(SUBPARTITION SALES_EAST_01 VALUES (‘EAST’) TABLESPACE TS_EAST,

SUBPARTITION SALES_WEST_01 VALUES (‘WEST’) TABLESPACE TS_EAST );

2、其他处理可以使用NO TABLESPACE子句替换TABLESPACE子句,这样可以避免ORA-14606错误:

CREATE TABLE SALES_HISTORY

(… other columns)

PARTITION BY RANGE (SALE_DATE)

SUBPARTITION BY LIST (SALE_LOCATION)

SUBPARTITION TEMPLATE

(SUBPARTITION SALES_EAST_01 VALUES (‘EAST’) TABLESPACE TS_EAST,

SUBPARTITION SALES_WEST_01 VALUES (‘WEST’) NO TABLESPACE );


数据运维技术 » ORA-14606: Tablespace was specified for previous subpartitions in template but is not specified for string ORACLE 报错 故障修复 远程处理