1
I have a table signed by DATA_HORA and I would like to create CONSTRAINT forcing the use of INDEX LOCAL instead of GLOBAL, but I am facing the following error. That’s possible?
Relatório de erros -
ORA-14039: colunas particionadas devem formar um subconjunto de colunas de chaves de um índice UNIQUE
14039. 00000 - "partitioning columns must form a subset of key columns of a UNIQUE index"
*Cause: User attempted to create a UNIQUE partitioned index whose
partitioning columns do not form a subset of its key columns
which is illegal
*Action: If the user, indeed, desired to create an index whose
partitioning columns do not form a subset of its key columns,
it must be created as non-UNIQUE; otherwise, correct the
list of key and/or partitioning columns to ensure that the index'
partitioning columns form a subset of its key columns
Follow instructions for simulation.
CREATE TABLE TESTE_INDEX (
"ID" CHAR(65),
"DATA_HORA" TIMESTAMP(6) NOT NULL,
"CODIGO" NUMBER
) PARTITION BY RANGE ("DATA_HORA") INTERVAL (NUMTODSINTERVAL(1,'DAY'))
SUBPARTITION BY HASH (CODIGO) SUBPARTITIONS 32
(PARTITION POS_DATA_P0 VALUES LESS THAN (TO_DATE(' 2020-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')))
;
ALTER TABLE TESTE_INDEX ADD CONSTRAINT "PK1_ID" PRIMARY KEY ("ID")
USING INDEX (CREATE UNIQUE INDEX IDX1_PK ON TESTE_INDEX ("ID") LOCAL);