Skip to Content
Aug 14, 2015 at 01:12 PM

create unique nonclustered online index


Hi List,

we are trying to build a unique non-clustered index with online options on round robin partition table with aprox 250 million rows, we halt almost 80 % of writes to the table, after several hours DDL fails with duplicate entries ,

but when we go in table and check for that specific entry is not there or has been changed .

We need to understand how online index creation works , seems the first phase asking for a table lock for 90 sec while putting table in cache after all the writes are ok while the server continues to build the index, but we still have application which are changing/updating the existing entries and maybe in last phase of index creation when try to sync and put the unique index the entries are not matching ?

( Is this the case, or are we hitting a know issues ?)

Msg 1505, Level 16, Stat2

create unique index aborted on duplicate key, primary key is '.....................

Thread( spid =...) initiating parallel primary error processing


create unique index idx1 on tab1(col1,col2,....) with online, consumers=10, statistics using 600 values