|
| 1 | +--- |
| 2 | +title: Sync data from Azure SQL Edge (Preview) by using SQL Data Sync |
| 3 | +description: Learn about syncing data from Azure SQL Edge (Preview) by using Azure SQL Data Sync |
| 4 | +keywords: SQL Edge,sync data from SQL Edge, SQL Edge data sync |
| 5 | +services: sql-database-edge |
| 6 | +ms.service: sql-database-edge |
| 7 | +ms.topic: tutorial |
| 8 | +author: SQLSourabh |
| 9 | +ms.author: sourabha |
| 10 | +ms.reviewer: sstein |
| 11 | +ms.date: 05/19/2020 |
| 12 | +--- |
| 13 | + |
| 14 | +# Tutorial: Sync data from SQL Edge to Azure SQL Database by using SQL Data Sync |
| 15 | + |
| 16 | +In this tutorial, you'll learn how to use an Azure SQL Data Sync *sync group* to incrementally sync data from Azure SQL Edge to Azure SQL Database. SQL Data Sync is a service built on Azure SQL Database that lets you synchronize the data you select bi-directionally across multiple SQL databases and SQL Server instances. For more information on SQL Data Sync, see [Azure SQL Data Sync](../azure-sql/database/sql-data-sync-data-sql-server-sql-database.md). |
| 17 | + |
| 18 | +Because SQL Edge is built on the latest versions of the [SQL Server Database Engine](/sql/sql-server/sql-server-technical-documentation/), any data synchronization mechanism that's applicable to an on-premises SQL Server instance can also be used to sync data to or from a SQL Edge instance running on an edge device. |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +This tutorial requires a Windows computer configured with the [Data Sync Agent for Azure SQL Data Sync](../azure-sql/database/sql-data-sync-agent-overview.md). |
| 23 | + |
| 24 | +## Before you begin |
| 25 | + |
| 26 | +* Create an Azure SQL database. For information on how to create an Azure SQL database by using the Azure portal, see [Create a single database in Azure SQL Database](../azure-sql/database/single-database-create-quickstart.md?tabs=azure-portal). |
| 27 | + |
| 28 | +* Create the tables and other necessary objects in your Azure SQL Database deployment. |
| 29 | + |
| 30 | +* Create the necessary tables and objects in your Azure SQL Edge deployment. For more information, see [Using SQL Database DAC packages with SQL Edge](stream-analytics.md). |
| 31 | + |
| 32 | +* Register the Azure SQL Edge instance with the Data Sync Agent for Azure SQL Data Sync. For more information, see [Add an on-premises SQL Server database](../azure-sql/database/sql-data-sync-sql-server-configure.md#add-on-prem). |
| 33 | + |
| 34 | +## Sync data between an Azure SQL database and SQL Edge |
| 35 | + |
| 36 | +Setting up synchronization between an Azure SQL database and a SQL Edge instance by using SQL Data Sync involves three key steps: |
| 37 | + |
| 38 | +<<<<<<< HEAD:articles/azure-sql-edge/tutorial-sync-data-sync.md |
| 39 | +1. Use the Azure portal to create a sync group. For more information, see [Create a sync group](../azure-sql/database/data-sync-sql-server-configure.md#create-sync-group). You can use a single *hub* database to create multiple sync groups to synchronize data from various SQL Edge instances to one or more SQL databases in Azure. |
| 40 | +======= |
| 41 | +1. Use the Azure portal to create a sync group. For more information, see [Create a sync group](../azure-sql/database/sql-data-sync-sql-server-configure.md#create-sync-group). You can use a single *hub* database to create multiple sync groups to synchronize data from various SQL Database Edge instances to one or more SQL databases in Azure. |
| 42 | +>>>>>>> 2c6244335001b78d9c3588dcb8e0fe56b17ee356:articles/sql-database-edge/tutorial-sync-data-sync.md |
| 43 | +
|
| 44 | +2. Add sync members to the sync group. For more information, see [Add sync members](../azure-sql/database/sql-data-sync-sql-server-configure.md#add-sync-members). |
| 45 | + |
| 46 | +3. Set up the sync group to select the tables that will be part of the synchronization. For more information, see [Configure a sync group](../azure-sql/database/sql-data-sync-sql-server-configure.md#add-sync-members). |
| 47 | + |
| 48 | +After you complete the preceding steps, you'll have a sync group that includes an Azure SQL database and a SQL Edge instance. |
| 49 | + |
| 50 | +For more info about SQL Data Sync, see these articles: |
| 51 | + |
| 52 | +* [Data Sync Agent for Azure SQL Data Sync](../azure-sql/database/sql-data-sync-agent-overview.md) |
| 53 | + |
| 54 | +* [Best practices](../azure-sql/database/sql-data-sync-best-practices.md) and [How to troubleshoot issues with Azure SQL Data Sync](../azure-sql/database/sql-data-sync-troubleshoot.md) |
| 55 | + |
| 56 | +* [Monitor SQL Data Sync with Azure Monitor logs](../azure-sql/database/sql-data-sync-monitor-sync.md) |
| 57 | + |
| 58 | +* [Update the sync schema with Transact-SQL](../azure-sql/database/sql-data-sync-update-sync-schema.md) or [PowerShell](../azure-sql/database/scripts/update-sync-schema-in-sync-group.md) |
| 59 | + |
| 60 | +## Next steps |
| 61 | + |
| 62 | +* [Use PowerShell to sync between Azure SQL Database and Azure SQL Edge](../azure-sql/database/scripts/sql-data-sync-sync-data-between-azure-onprem.md). In this tutorial, replace the `OnPremiseServer` database details with the Azure SQL Edge details. |
0 commit comments