1

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

Charles
  • 50,943
  • 13
  • 104
  • 142
  • 1
    Welcome to Stack Overflow! Please be aware that tags stand alone. Adding `[sql]` and `[server]` to your question doesn't mean the same thing as adding `[sql-server]`! Always be sure to read the helpful tag descriptions that appear when you type tag names, and select your tags with care. – Charles Dec 27 '13 at 00:57
  • Merge replication adds this GUID column but you dont have to make it your primary key. this GUID column is only added for Replication purposes and nothing else. – M.Ali Dec 27 '13 at 01:14
  • thanks...great..does it need a timestamp column or is that automatic? – user3138120 Dec 27 '13 at 07:55

1 Answers1

0

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.

Brandon Williams
  • 3,695
  • 16
  • 19