Change the key at Subscriber | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Change the key at Subscriber

Hi all, I have the following problem: I have server A and Server B. I set up a replication between two the Server. Server A is publisher, Server B is subscriber. At Server A, I have two table: Table A and Table B.
Table A has three fields: IDhocsinh, name, ID lop. IDhocsinh is primary key, IDlop is foreign key.
Table B has two fields: IDlop and Description. IDlop is primary key. In my replication, I want to replicate only Table A. It’s OK.
And at the subsciber, the user change the primary key of one record (named I) of Table A in the Server B. It’s also OK.
But in Server A, the user change the primary key of I record of Table A in Server A. -> There is an error occurs: "The row was not found at the Subscriber when applying the replicated command". Now I want to solve the problem. Please help me. Thanks a lot.

Hi ya, you’ll have to find the record in your destination database and change the values back to what they were before the change was made. Replication will be happy then. You can’t make changes in the destination database unless you’re using merge replication or transactional with updates Cheers