Wednesday, March 7, 2012

replication - duplicate key.

Hi,

How transaction replication handles this : subscriber side updatable

if there is already a row with same primary key value on
subsciber, will replication give error of duplicate key /
key already exist while inserting at subscriber or what
will happen?

eg.
publisher server S1
database D1
table order
primary key order_no
data:
order_no customer_no item_no...
1 1 1
2 ...
3
4
subscriber server S2
database D2
table order
primary key order_no
data
order_no customer_no item_no...
1 1 1
2 ...
3
4
5

what if someone insert order_no 5 on subscriber and then
same order no came to publisher and replication tried to
replicate order no 5 to subscriber what will happen?

Please reply.
Ram.Primary key constraints error will be displayed if trying to insert duplicate values.|||Originally posted by Satya
Primary key constraints error will be displayed if trying to insert duplicate values.

Satya,

I checked . Replication just ignore the action of insertion if primary key exist on the subscriber. no error!

Ram.

No comments:

Post a Comment