Custom UniqueId for merge replication on sql server 2008?

524 Views Asked by At

When doing merge replication, is the column ROWGUIDCOL compulsory? Can I use a custom column I have created that will be unique across all databases?

Does this mean I have to use GUID as my primary key or can i have a gUID column and my custom id column as well?

When I try to create a merge replication, it wants to add a guid column and I am not sure if thats what i want to do.

Any suggest a stragety to create a merge replication? I really want to avoid using a guid as my primary key on all tables...this would also create a alot of work for our application

1

There are 1 best solutions below

0
On

Per Considerations for Merge Replication, each published table requires a GUID column with the ROWGUIDCOL property set and a unique index.

Merge replication uses a globally unique identifier (GUID) column to identify each row during the merge replication process. If a published table does not have a uniqueidentifier column with the ROWGUIDCOL property and a unique index, replication adds one. Ensure that any SELECT and INSERT statements that reference published tables use column lists. If a table is no longer published and replication added the column, the column is removed; if the column already existed, it is not removed.