UNABLE TO CREATE PRIMARY KEY ON COMPOSITE PARTITIONED TABLE ORA-1408 (Doc ID 988714.1)

Last updated on MARCH 27, 2014

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.5 and later   [Release: 10.1 and later ]
Oracle Server - Enterprise Edition - Version: 10.1.0.5 to 11.2.0.1.0   [Release: 10.1 to 11.2]
Information in this document applies to any platform.

Symptoms

Adding a primary key constraint to a composite partitioned table generates an "ORA-01408: such column list already indexed" error.
ORA-01408: such column list already indexed


Testcase:
---------
CREATE TABLE table_temp(id_effectuation NUMBER,
client_key NUMBER,pf NUMBER(3),tariff VARCHAR2(25),
type VARCHAR2(2),unit VARCHAR2(4),t_value NUMBER,
csp NUMBER(2),priority NUMBER,partition_day NUMBER(2))
TABLESPACE users
PARTITION BY RANGE (pf)
SUBPARTITION BY LIST (partition_day)
SUBPARTITION TEMPLATE
( SUBPARTITION D01 VALUES (1),
SUBPARTITION D02 VALUES (2),
SUBPARTITION D03 VALUES (3),
SUBPARTITION D04 VALUES (4),
SUBPARTITION D05 VALUES (5),
SUBPARTITION D06 VALUES (6),
SUBPARTITION D07 VALUES (7),
SUBPARTITION D08 VALUES (8),
SUBPARTITION D09 VALUES (9),
SUBPARTITION D10 VALUES (10),
SUBPARTITION D11 VALUES (DEFAULT)
)
(
PARTITION P1 VALUES LESS THAN (1) TABLESPACE USERS,
PARTITION P2 VALUES LESS THAN (2) TABLESPACE USERS,
PARTITION P3 VALUES LESS THAN (3) TABLESPACE USERS,
PARTITION PMAX VALUES LESS THAN (MAXVALUE) TABLESPACE USERS);


--Create index
CREATE INDEX index_temp_idx2 ON table_temp
(id_effectuation, client_key, pf, tariff, type)
LOCAL(
PARTITION P1 TABLESPACE USERS,
PARTITION P2 TABLESPACE USERS,
PARTITION P3 TABLESPACE USERS,
PARTITION PMAX TABLESPACE USERS);


-- Adding PK raises ORA-01408 error
ALTER TABLE table_temp
ADD CONSTRAINT table_temp_pk PRIMARY KEY (id_effectuation, client_key, pf, tariff, type);

ORA-01408: such column list already indexed

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms