Sql-server – Bidirectional Replication Push and Pull with SQL Server

replicationsql server

Please bear with me, I'm a developer working with a client without access to a strong DBA. I have a question about bi-directional replication with the following setup and requirements:

  • MSSQL Server Database A: the back-end of a web application in a remote environment
  • MSSQL Server Database B: a mirror of Database A that resides in a DMZ

Databases A and B can be updated independently from each other but need to stay in sync. Normally this would be a good candidate for bi-directional replication because the business rules are such that conflicts will not occur in the replicated tables.

However, the client has a security requirement that no transactions can be initiated from the remote environment into the DMZ.

Can I set up bi-directional replication so that the DMZ Database B pushes its changes to Database A and pulls Database A's changes in? Or do you suggest another strategy – replication or otherwise?

Thanks!

Best Answer

Yes you can run all the replication agents from the machine inside the firewall. After everything is setup normally, just disable the SQL Agent jobs that run the agents on the DMZ machine, then create the same jobs on the machine inside the network. Enable the jobs inside the network and start them.

The push and pull terminology with SQL replication just refers to the machine that actually runs the job. There's no other differences besides the job location.