Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Why ROWGUIDCOL when PK exists?

Author  Topic 

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2004-09-27 : 14:50:41
I'm attempting to set up merge replication using the EM wizard, and it says it wants to add a ROWGUIDCOL column to all four of the tables that I've specified as articles, but each table already has a primary key, so why is this necessary?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-27 : 15:01:24
Do you really need merge replication? Is there someone at your site who has merge replication experience? Merge replication is the hardest out of the replication options. You need to write rules to determine who wins when a collision occurs. Have the rules been defined? I wouldn't suggest just setting this up until all homework has beendone.

See the "How Merge Replication Works" in SQL Server Books Online to answer your question.

Tara
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2004-09-27 : 15:12:37
I guess I don't understand the difference between transactional replication and merge replication. I have four tables in DB1 and each has a copy in DB2. They will be updated on both ends, and whenever change occurs, I need the changes instantly replicated. Can I use trans. rep. for this?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-27 : 15:15:59
You will need merge replication for this. But you should not embark on this without reading all about in SQL Server Books Online and whatever books you can get your hands on. This is not an easy thing. Might be easy to setup, but not easy to maintain. If you have any merge replication resources at your company, use them.

Tara
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2004-09-27 : 15:27:09
Sadly no resources here. So getting back to the original question, in case I still decide to use merge replication, why must ROWGUIDCOL columns be created when I already have primary keys?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-27 : 15:34:26
Did you check out that topic in SQL Server Books Online mentioned in my first post? Having a primary key isn't enough.

Tara
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2004-09-27 : 15:46:48
"Microsoft® SQL Server™ 2000 identifies a unique column for each row in the table being replicated. This allows the row to be identified uniquely across multiple copies of the table."

Found it, thanks. Does this mean that, e.g., the GUID for the first row of Table1 in DB1 will not be equal to the GUID for the first row of Table1 in DB2? Sorry, I'm kinda dense.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-27 : 15:48:21
Yes.

Tara
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2004-09-27 : 16:26:38
Yes I'm dense, or yes the GUIDs won't match? Just kidding, thanks Tara.
Go to Top of Page
   

- Advertisement -