Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Posts
    94

    Unanswered: 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.

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Primary key constraints error will be displayed if trying to insert duplicate values.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Nov 2002
    Posts
    94
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •