paritioning table : impossible to enforce index uniqueness across partitions with a local index

StackOverflow https://stackoverflow.com/questions/20803099

  •  22-09-2022
  •  | 
  •  

Pregunta

I am actually trying to partition a table.

while I am altering this table

ALTER TABLE ttaa ADD constraint PK_ttaa primary key clustered ( CODE, BRCODE, ttaa, IND, ttaa_NO, LINE_NO ) GO

I having this error .

Cannot create unique index 'PK_ttaa' on table 'PK_ttaa' as a local index. The table partition condition and the specified index keys make it impossible to enforce index uniqueness across partitions with a local index.

can anyone help me ?

¿Fue útil?

Solución

To enforce uniqueness the partition keys must be a subset of the index keys, and must be in the same sequence.

Check the documentation for more detailed information: Adaptive Server Enterprise 15.5 > Transact-SQL Users Guide > Partitioning Tables and Indexes > Indexes and partitions

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top