Share via

transaction replication not generate snap after disconnect and connect database

Galaxy 116 Reputation points
2021-10-06T20:28:05.19+00:00

Hi Team

I Create Transaction Replication with this scenario

1) Server Have 2 Table 1 Customer & Transaction Table
2) 2 Sub Server Have same Tables
my scenario when the transaction Happened in ( Sub Servers ) it published to server, when the server Get the Transaction it recalculate the Customer Table and Published to sub servers

So Finally Have 1 server Publisher to 2 subscribers and each subscriber Is Publisher To Server

every Thing is work Fine if the network is Connected Between Servers , When i disconnect the network and Make 1 Transaction in each sub Server and reconnect it again it work fine
but if i make 2 transaction in each sub server and reconnect the server the last sub server make transaction is get the replication from server but the another one not get it.

for example

Server Customer Fields Have QTY=10000
Sub Server1 Have Transaction Fields QTY=1000
Sub Server2 Have Transaction Fields QTY=1000
Sub Server2 Have Transaction Fields QTY=1000

when the sub servers publish transaction to Server the server reduce the amount to QTY=7000
then the Server publish the New QTY to sub servers so it must be 7000
what i show the Sub server 2 is Change the Value To 7000
but the sub server 2 QTY is 8000

in replication Monitor there is No error Get
this happened if i disconnect the server and reconnect it again and have many transaction is sub server
any suggestion to solve this

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

Galaxy 116 Reputation points
2021-10-11T08:29:13.04+00:00

sp_addsubscription @publication = 'TEST', ..., @German Gutierrez _detection = 'false'

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Tom Phillips 17,786 Reputation points
    2021-10-07T11:24:57.01+00:00

    You have 1 publisher and 2 subscribers. You should not be making changes to the rows on the subscriber database. That is not a valid case for Transactional Replication. The publisher always pushes changes to the subscribers. Not the other way around.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.