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.
| Author |
Topic |
|
bobanjayan
Yak Posting Veteran
67 Posts |
Posted - 2004-10-28 : 05:43:59
|
| I want to use merge replication. I have a doubt.2 Servers replicates each other.User A connects to Server A.User B connects to Server B.User A entered a transaction; she got 1001 unique identification number for that entry.User B also got the same number when he entered the entry.Both entries are important.Considering the two servers as one, the primary key is violated.While merging how will it handle the primary keys? |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-28 : 06:16:34
|
quote: Originally posted by bobanjayan I want to use merge replication. I have a doubt.2 Servers replicates each other.User A connects to Server A.User B connects to Server B.User A entered a transaction; she got 1001 unique identification number for that entry.User B also got the same number when he entered the entry.Both entries are important.Considering the two servers as one, the primary key is violated.While merging how will it handle the primary keys?
you should not use the same pk id, what we do is we have the usual pk_id + source id, so combination of two is unique, else if autonumbered, use odd for A and even for Belse you need to handle that in your application, generating unique pk's instead of allowing sql to do it for you.--------------------keeping it simple... |
 |
|
|
|
|
|