Groups | Blog | Home
all groups > sql server replication > june 2004 >

sql server replication : 1 publisher with 2 subscriber


echo
6/19/2004 6:09:02 AM
urgently need help.

i have 1 publisher (say s0). then i do pull subscribe from s1 (continously running). when i update s0 data with dts, the replication goes right.
now i make another subscriber s2 (continuously running). and when i update s0,
many confilcts like below occurs:

The row was updated at 's1' but could not be updated at 's0'. Violation of PRIMARY KEY constraint 'PK_BUS_MTBUS'. Cannot insert duplicate key in object 'BUS_MTBus'

why is this happen? pls. urgently need help
Paul Ibison
6/19/2004 6:57:01 PM
Echo,
the problem may be because your data is not partitioned on PK and therefore
you have conflicts arising. Can you confirm if you are changing PK values?
If so you might create a combined PK which partitions the data according to
subscriber and publisher, or you might use partitioned identity ranges.
HTH,
Paul Ibison

echo
6/20/2004 2:39:03 AM
Thanks Paul,
i thought that the programmer made some user triggers on the tables which is make dts running confusely (suspect).
here comes the next problem. i'm using merge replication which allow updates at subscribers and publishers. when all db involved are heavily used, can we do reinitialitation smoothly and safely? (therefore the snaphot should run once again, right?).
i'm thinking these option to consider:
- keep the existing table unchanged --> not possible, because error will occur when bulk copying (we already have the same data)
- drop the existing table and recreate it --> not possible
- delete all data --> not possible. we may lost the last updated data.

thanks for helping me


[quoted text, click to view]
echo
6/20/2004 3:15:01 AM
Thanks again Paul. this is helpful for now.


[quoted text, click to view]
Paul Ibison
6/20/2004 11:01:36 AM
Echo,
when you choose to reinitialize, ther will be a dialog box which pops up.
This gives you the option to upload any changes amde at the subscriber and
not yet sent to the publisher. This upload happens before the snapshot is
created and applied, and may solve your issues.
HTH,
Paul Ibison

AddThis Social Bookmark Button