In SQL Server, if I have a non-unique clustered index on a table, how does replication work for that table?
For example:
CREATE TABLE MyData (
MyDataID uniqueidentifier not null,
MyData varchar(max) not null,
RecordDateTime smalldatetime not null,
PRIMARY KEY NONCLUSTERED (MyDataID ASC)
)
CREATE CLUSTERED INDEX IX_MyData_RecordDateTime ON MyData (
RecordDateTime ASC
)
(For purposes of the question, the table structure is more illustrative than exact)
I know that SQL Server will add a hidden 4-byte "uniquifier" to rows with duplicate RecordDateTime
values, but in this case, how are the rows replicated?
Specifically, if there are two rows R1
and R2
on two publishers P1
and P2
, if R1.RecordDateTime
is unique on P1
and R2.RecordDateTime
is unique on P2
, but R1.RecordDateTime
is equal to R2.RecordDateTime
, how are the rows merged onto a shared subscriber S
?