Replication

rhu rhu 0 Reputation points
2026-10-01T08:11:02.2566667+00:00

Im seeking some help. Im trying to do a replication from a main to secondary server. This is well. After I insert records to the tables in the DB here then do another replication back to main from secondary, The records are replicated back but the main DB is rendered unsable ie I can not insert data into the tables. Im using SQL server 2016 standard. Is there a way around this issue. Thanks in advance.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

1 answer

Sort by: Most helpful
  1. Yeddula Epafra 10 Reputation points
    2026-10-01T08:15:30.7466667+00:00

    Hi @rhu rhu

    Thanks for the details. I can't see your servers, so I can't say for sure what made the main database unusable, but here's what I'd check.

    Why this can happen Standard transactional replication is one-way, and the subscriber is meant to be read-only. If you set up a second replication from the secondary back to the main server, the two can conflict, for example through snapshot re-initialization, duplicate keys, or identity values colliding. That could be why inserts fail on the main database.

    Options for two-way replication on SQL Server 2016 Standard

    To help you further, please share:

    1. Which replication type you are using (snapshot, transactional, or merge).
    2. The exact error message when you insert into the main database.
    3. Whether your tables use identity columns.
    4. Whether the second replication re-initialized or re-created the tables.

    Please don't post passwords or server names.

    If this helps, please click Accept Answer.

    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.