Azure Merge Replication
Azure Merge Replication
First will go to the properties of the primary server and then connect to the server in ssms and then
connect to secondary server as well.
Configuration from the cloud,
First will go to primary server and then select primary database where we have the actual data and
we wanted to synchronize to another server from this server.
Coming to conflict resolution, these are two types one is Hub win and another is member win
Cloud source called hub and on premise and cloud target are called members.
It tells who should win in case of transaction conflict, like if two transactions are triggered at the
same time.
If hub win selected the hub transactions are forwarded and member transactions will be rolled back.
99% conflict never be a case why because, it will update in after 5 min.
If you have more members then better to go with Hub or if you have less members then go with
members depends up on the situation
That is who must take the main control that is given by the business itself.
Go to the first option, choose the sync agent gateway and then create a new agent as we don’t have
existing already.
For the we need to download client sync agent service, It is necessary to install the sync agent client
to allow the on premises database
There is an agent between the on premise and cloud.
Creating service account should have the rights on sql server. This login should have at least
db_owner permissions.
This setup creates the Microsoft azure sync agent service.
When we configure this, it will automatically build the service. Sync is happening through this agent.
Give an agent name and then click on create and generate key
And then copy the key and go to the tool and submit the agent key
For on premise authentication we must register on premise server by using click on Register
Done the on-premise authentication and cloud authentication as well
Give the server name, on premise db and sync direction and click on Ok.
And then click on ok, now adding on premise db configuration is completed.
Now what data you wanted to push it to the target, that we have to select
Select meta db and click on refresh schema, when it click on that it will display complete hub
database tables.
We can only push the tables those have primary key only
Select the articles, what you want to push it to the target and click on save. Once you save it , it
automatically initialize the data on other two servers.
Go to the primary database then go to the sync to other databases open the sync group and then go
to the tables.
In the tables select the article what you wanted to sync with other members and click on save then
this will also be part of replication now.