need help in resolving the conflicts

  • Hi,

    Im facing the problem, my conflict viewer is showing this message:

    "The row was inserted at 'Server1.DB1' but could not be inserted at 'Server2.DB2'. Violation of PRIMARY KEY constraint 'PK_TBL'. Cannot insert duplicate key in object 'TBL'."

    What would be the root cause, but keep in mind I have the composit PK and have two columns as PK. And one is serial number and the other is office_num.

    Serial number with different idseed increments. And office numbers also have different values to be entered from two servers.

    E.g., for Server1 .... 0

    for Server2 .... 1

    Then y conflict raised.???

    Waiting for your kind suggestions.

  •  

    Check this behaviour using one of this 2 ways.

    1. If SerialNo and OfficeNo are part of your Insert than

    collect that value in temp variable and run t-sql

    select  * from server2..tab1

    where serialno = @s-2 and officno = @f

    and find if identical combination is there or not. 

    Another approach is

    2. If SerialNo and OfficeNo are part of server2 table

    with increment seed than drop the primary key

    composition for min  and insert few rows and check

    using Select to find the duplicate col. that will tell

    you where the problem exist.

    Hope this helps.

     

     

    Kindest Regards,

    Sameer Raval [Sql Server DBA]
    Geico Insurance
    RavalSameer@hotmail.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply