This is a sample ADF and SQL based generic solution template that can be used to copy incremental data from one SQL server database to another. Solution uses SQL ChangeTracking feature on the source database to identify incremental changes and export incremental changes to destination database and merge it.
- Identify Source and Destination database
- Connect to source database and execute Source SQL Script
- Connect to destination database and execute Destination SQL Script
- Create a Azure Data Factory Resource in Azure Subscription
- Note down Source and Destination Database connection string
- Download the ARM template file to your local directory.
- Click [Template deployment] https://ms.portal.azure.com/#create/Microsoft.Template
- Click build your own template in the editor option
- Click load file and locate the ARM template file TemplateForDataFactory.json and click Save.
- Provide required parameters and review + create.
- Open Azure Data Factory Resouce and Click Author and Monitor
- Click Manage> Linked Services and validate Source and Destination database link services.
- Click Author and Execute FULL_EXPORT_SQL_TO_SQL, Provide table name as parameter
- FULL_EXPORT_SCHEDULE pipeline can be used to add multiple tables for export
- Montitor the pipeline execution
- Execute INCREMENTAL_SQL_TO_SQL manually or via schedule trigger to execute incremental data copy from source to destination