Skip to content

Commit d0d8dab

Browse files
20230308 edit pass
1 parent f56518a commit d0d8dab

2 files changed

Lines changed: 29 additions & 28 deletions

File tree

-535 Bytes
Loading

‎azure-sql/database/sql-data-sync-sql-server-configure.md‎

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ms.topic: tutorial
1111
ms.custom: sqldbrb=1
1212
---
1313
# Tutorial: Set up SQL Data Sync between databases in Azure SQL Database and SQL Server
14+
1415
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
1516

1617
In this tutorial, you learn how to set up SQL Data Sync by creating a sync group that contains both Azure SQL Database and SQL Server instances. The sync group is custom configured and synchronizes on the schedule you set.
@@ -28,60 +29,60 @@ For PowerShell examples on how to configure SQL Data Sync, see [How to sync betw
2829

2930
1. Go to the [Azure portal](https://portal.azure.com) to find your database in SQL Database. Search for and select **SQL databases**.
3031

31-
![Search for databases, Microsoft Azure portal](./media/sql-data-sync-sql-server-configure/search-for-sql-databases.png)
32+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/search-for-sql-databases.png" alt-text="A screenshot of the Azure portal search for databases.":::
3233

3334
1. Select the database you want to use as the hub database for Data Sync.
3435

35-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/select-sql-database.png" alt-text = "Select from the database list, Microsoft Azure portal":::
36+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/select-sql-database.png" alt-text = "A screenshot from the Azure portal showing where to select from the database list.":::
3637

3738
> [!NOTE]
3839
> The hub database is a sync topology's central endpoint, in which a sync group has multiple database endpoints. All other member databases with endpoints in the sync group, sync with the hub database.
3940
4041
1. On the **SQL database** menu for the selected database, select **Sync to other databases**.
4142

42-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/sync-to-other-databases.png" alt-text = "Sync to other databases, Microsoft Azure portal":::
43+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/sync-to-other-databases.png" alt-text = "A screenshot from the Azure portal page for an Azure SQL database, showing the Sync to other databases menu option.":::
4344

4445
1. On the **Sync to other databases** page, select **New Sync Group**. The **New sync group** page opens with **Create sync group**.
4546

46-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/create-sync-group.png" alt-text = "Set up new sync group with private link":::
47+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/create-sync-group.png" alt-text = "A screenshot from the Create Data Sync page of the Azure portal.":::
4748

4849
On the **Create Data Sync Group** page, change the following settings:
4950

5051
| Setting       | Description |
5152
| ------------------------------ | ------------------------------------------------- |
5253
| **Sync Group Name** | Enter a name for the new sync group. This name is distinct from the name of the database itself. |
53-
| **Sync Metadata Database** | Choose to create a database (recommended) or to use an existing database.<br/><br/>If you choose **New database**, select **Create new database.** Then on the **SQL Database** page, name and configure the new database and select **OK**.<br/><br/>If you choose **Use existing database**, select the database from the list. |
54-
| **Automatic Sync** | Select **On** or **Off**.<br/><br/>If you choose **On**, enter a number and select **Seconds**, **Minutes**, **Hours**, or **Days** in the **Sync Frequency** section.<br/> The first sync begins after the selected interval period elapses from the time the configuration is saved.|
55-
| **Conflict Resolution** | Select **Hub win** or **Member win**.<br/><br/>**Hub win** means when conflicts occur, data in the hub database overwrites conflicting data in the member database.<br/><br/>**Member win** means when conflicts occur, data in the member database overwrites conflicting data in the hub database. |
54+
| **Sync Metadata Database** | Choose to create a database (recommended) or to use an existing database.<br /><br />If you choose **New database**, select **Create new database.** Then on the **SQL Database** page, name and configure the new database and select **OK**.<br /><br />If you choose **Use existing database**, select the database from the list. |
55+
| **Automatic Sync** | Select **On** or **Off**.<br /><br />If you choose **On**, enter a number and select **Seconds**, **Minutes**, **Hours**, or **Days** in the **Sync Frequency** section.<br />The first sync begins after the selected interval period elapses from the time the configuration is saved.|
56+
| **Conflict Resolution** | Select **Hub win** or **Member win**.<br /><br />**Hub win** means when conflicts occur, data in the hub database overwrites conflicting data in the member database.<br /><br />**Member win** means when conflicts occur, data in the member database overwrites conflicting data in the hub database. |
5657
| **Use private link** | Choose a service managed private endpoint to establish a secure connection between the sync service and the hub database. |
5758

5859
> [!NOTE]
5960
> Microsoft recommends to create a new, empty database for use as the **Sync Metadata Database**. Data Sync creates tables in this database and runs a frequent workload. This database is shared as the **Sync Metadata Database** for all sync groups in a selected region and subscription. You can't change the database or its name without removing all sync groups and sync agents in the region. Additionally, an Elastic jobs database cannot be used as the SQL Data Sync Metadata database and vice versa.
6061
6162
Select **OK** and wait for the sync group to be created and deployed.
62-
63+
6364
1. On the **New Sync Group** page, if you selected **Use private link**, you will need to approve the private endpoint connection. The link in the info message will take you to the private endpoint connections experience where you can approve the connection.
6465

65-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/approve-private-link-update.png" alt-text = "Approve private link":::
66-
66+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/approve-private-link-update.png" alt-text = "A screenshot from the Azure portal Private Endpoint connections page, showing where to approve a private link.":::
67+
6768
> [!NOTE]
6869
> The private links for the sync group and the sync members need to be created, approved, and disabled separately.
6970
7071
## Add sync members
7172

7273
After the new sync group is created and deployed, open the sync group and access the **Databases** page, where you will select sync members.
7374

74-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/add-sync-members.png" alt-text = "Select sync members":::
75-
75+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/add-sync-members.png" alt-text = "A screenshot from the Azure portal showing the Select sync members page.":::
76+
7677
> [!NOTE]
7778
> To update or insert the username and password to your hub database, go to the **Hub Database** section in the **Select sync members** page.
7879
79-
### To add a database in Azure SQL Database
80+
### Add a database in Azure SQL Database
8081

8182
In the **Select sync members** section, optionally add a database in Azure SQL Database to the sync group by selecting **Add an Azure Database**. The **Configure Azure Database** page opens.
82-
83-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/step-two-configure.png" alt-text = "Add a database to the sync group":::
84-
83+
84+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/step-two-configure.png" alt-text = "A screenshot from the Azure portal of the Configure Azure Database page, where you can add a database to the sync group.":::
85+
8586
On the **Configure Azure SQL Database** page, change the following settings:
8687

8788
| Setting       | Description |
@@ -98,13 +99,13 @@ In the **Select sync members** section, optionally add a database in Azure SQL D
9899

99100
<a name="add-on-prem"></a>
100101

101-
### To add a SQL Server database
102+
### Add a SQL Server database
102103

103104
In the **Member Database** section, optionally add a SQL Server database to the sync group by selecting **Add an On-Premises Database**. The **Configure On-Premises** page opens where you can do the following things:
104105

105106
1. Select **Choose the Sync Agent Gateway**. The **Select Sync Agent** page opens.
106107

107-
:::image type="content" source="./media/sql-data-sync-sql-server-configure/steptwo-agent.png" alt-text = "Creating a sync agent":::
108+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/steptwo-agent.png" alt-text = "A screenshot from the Azure portal, in the Configure On-Premises steps. When the Choose the Sync Agent Gateway option is selected, the Select Sync Agent page is shown.":::
108109

109110
1. On the **Choose the Sync Agent** page, choose whether to use an existing agent or create an agent.
110111

@@ -125,32 +126,32 @@ In the **Member Database** section, optionally add a SQL Server database to the
125126

126127
1. On the SQL Server computer, locate and run the Client Sync Agent app.
127128

128-
![The data sync client agent app](./media/sql-data-sync-sql-server-configure/datasync-preview-clientagent.png)
129+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-preview-clientagent.png" alt-text="A screenshot from the Microsoft SQL Data Sync 2.0 client agent app. The Submit Agent Key button is highlighted.":::
129130

130131
1. In the sync agent app, select **Submit Agent Key**. The **Sync Metadata Database Configuration** dialog box opens.
131132

132133
1. In the **Sync Metadata Database Configuration** dialog box, paste in the agent key copied from the Azure portal. Also provide the existing credentials for the server on which the metadata database is located. (If you created a metadata database, this database is on the same server as the hub database.) Select **OK** and wait for the configuration to finish.
133134

134-
![Enter the agent key and server credentials](./media/sql-data-sync-sql-server-configure/datasync-preview-agent-enterkey.png)
135+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-preview-agent-enterkey.png" alt-text="Enter the agent key and server credentials.":::
135136

136137
> [!NOTE]
137-
> If you get a firewall error, create a firewall rule on Azure to allow incoming traffic from the SQL Server computer. You can create the rule manually in the portal or in SQL Server Management Studio (SSMS). In SSMS, connect to the hub database on Azure by entering its name as <hub_database_name>.database.windows.net.
138+
> If you get a firewall error, create a firewall rule on Azure to allow incoming traffic from the SQL Server computer. You can create the rule manually in the portal or in SQL Server Management Studio (SSMS). In SSMS, connect to the hub database on Azure by entering its name as `<hub_database_name>.database.windows.net`.
138139
139140
1. Select **Register** to register a SQL Server database with the agent. The **SQL Server Configuration** dialog box opens.
140141

141-
![Add and configure a SQL Server database](./media/sql-data-sync-sql-server-configure/datasync-preview-agent-adddb.png)
142+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-preview-agent-adddb.png" alt-text="Add and configure a SQL Server database.":::
142143

143144
1. In the **SQL Server Configuration** dialog box, choose to connect using SQL Server authentication or Windows authentication. If you choose SQL Server authentication, enter the existing credentials. Provide the SQL Server name and the name of the database that you want to sync and select **Test connection** to test your settings. Then select **Save** and the registered database appears in the list.
144145

145-
![SQL Server database is now registered](./media/sql-data-sync-sql-server-configure/datasync-preview-agent-dbadded.png)
146+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-preview-agent-dbadded.png" alt-text="A screenshot from the Microsoft SQL Data Sync 2.0 application showing that the SQL Server database and machine are now registered.":::
146147

147148
1. Close the Client Sync Agent app.
148149

149-
1. In the portal, on the **Configure On-Premises** page, select **Select the Database**.
150+
1. In the Azure portal, on the **Configure On-Premises** page, select **Select the Database**.
150151

151152
1. On the **Select Database** page, in the **Sync Member Name** field, provide a name for the new sync member. This name is distinct from the name of the database itself. Select the database from the list. In the **Sync Directions** field, select **Bi-directional Sync**, **To the Hub**, or **From the Hub**.
152153

153-
![Select the on-premises database](./media/sql-data-sync-sql-server-configure/datasync-preview-selectdb.png)
154+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-preview-selectdb.png" alt-text="A screenshot from the Azure portal, showing the Select Database page. Under Sync Directions, Bi-directional Sync is highlighted.":::
154155

155156
1. Select **OK** to close the **Select Database** page. Then select **OK** to close the **Configure On-Premises** page and wait for the new sync member to be created and deployed. Finally, select **OK** to close the **Select sync members** page.
156157

@@ -161,7 +162,7 @@ In the **Member Database** section, optionally add a SQL Server database to the
161162

162163
After the new sync group members are created and deployed, go to the **Tables** section in the **Database Sync Group** page.
163164

164-
![Step 3 settings](./media/sql-data-sync-sql-server-configure/configure-sync-group.png)
165+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/configure-sync-group.png" alt-text="In the Azure portal, un the Tables page, select tables and fields to sync.":::
165166

166167
1. On the **Tables** page, select a database from the list of sync group members and select **Refresh schema**. Please expect a few minutes delay in refresh schema, the delay might be a few minutes longer if using private link.
167168

@@ -171,7 +172,7 @@ After the new sync group members are created and deployed, go to the **Tables**
171172

172173
1. By default, databases are not synced until scheduled or manually run. To run a manual sync, navigate to your database in SQL Database in the Azure portal, select **Sync to other databases**, and select the sync group. The **Data Sync** page opens. Select **Sync**.
173174

174-
![Manual sync](./media/sql-data-sync-sql-server-configure/datasync-sync.png)
175+
:::image type="content" source="./media/sql-data-sync-sql-server-configure/datasync-sync.png" alt-text="A screenshot from the Azure portal showing the manual sync button for a Database Sync Group.":::
175176

176177
## FAQ
177178

@@ -255,4 +256,4 @@ For more info about SQL Data Sync, see:
255256
For more info about SQL Database, see:
256257

257258
- [SQL Database Overview](sql-database-paas-overview.md)
258-
- [Database Lifecycle Management](/previous-versions/sql/sql-server-guides/jj907294(v=sql.110))
259+
- [Database Lifecycle Management](/previous-versions/sql/sql-server-guides/jj907294(v=sql.110))

0 commit comments

Comments
 (0)