0% found this document useful (0 votes)
73 views16 pages

Azure Merge Replication

This document provides steps for configuring Azure Merge Replication between an on-premises SQL Server database and an Azure SQL database: 1. Configure the primary server and connect to the database where the source data resides. Select "Sync to other databases" to begin replication configuration. 2. Create a sync group and configure sync frequency and conflict resolution settings. Conflict resolution can be set to "Hub win" or "Member win" depending on the topology. 3. Add sync members by configuring the Azure SQL database and on-premises database. For the on-premises database, install the Azure Sync Agent to enable authentication between on-prem and cloud. 4.

Uploaded by

Naresh Choppara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views16 pages

Azure Merge Replication

This document provides steps for configuring Azure Merge Replication between an on-premises SQL Server database and an Azure SQL database: 1. Configure the primary server and connect to the database where the source data resides. Select "Sync to other databases" to begin replication configuration. 2. Create a sync group and configure sync frequency and conflict resolution settings. Conflict resolution can be set to "Hub win" or "Member win" depending on the topology. 3. Add sync members by configuring the Azure SQL database and on-premises database. For the on-premises database, install the Azure Sync Agent to enable authentication between on-prem and cloud. 4.

Uploaded by

Naresh Choppara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

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.

And then will go to the option “Sync to other databases”


And then click on option +New Sync Group

1st step is Creating Data Sync Group


Sync frequency should be between 5 min to 30 days, as of now this is the drawback in cloud may be
this will resolve in future.

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.

Next step in the configuration is “Add sync members”

2nd step is adding the member databases

Go to add an azure database

Go to add an On- premises databases


Firstly, we must configure the on premises database why because of

Extra authentication mechanism, for that we must install cloud agent

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.

In this bi-directional authentication, we must perform here.

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.

Find the tool after installation complete and click on it.

And then come to sync agent page

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

Submit agent key


Now cloud authentication is done, as of now the on premise can go to the cloud.

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

Its done, now come to the cloud

Here we have done the configuration click on ok.


And then select the database which we have configured just now

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.

Adding sync members 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.

How to add a new article?

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.

You might also like