Moving data between Azure SQL databases

King Java 790 Reputation points
2024-02-14T19:05:12.7+00:00

I am trying to come up with a best way to move data between two/three databases within same Azure SQL.

I am talking about inserting new data to about 20+ tables daily.

Basically, it is using Insert statement from one or two databases to other database.

Is is possible just running Stored Procedure to push data?

Or do I have to use Azure Data Factory to do this?

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandan Hegde 36,146 Reputation points MVP Volunteer Moderator
    2024-02-15T03:28:18.7433333+00:00

    Hey,

    There are multiple ways to sync data between tables between 2 Azure SQL databases:

    1. Create external tables( Elastic queries) to read data from another database and use SP to copy from 1 database to another. https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-query-overview?view=azuresql ANyhow you would need an orchestrator to trigger the SP and also the performance is not great w.r.t elastic query with large amount of data
    2. You can use ADF/SYnapse pipelines/Fabric pipelines to sync data between 2 tables
    3. You can use data sync : https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-data-sync-data-sql-server-sql-database?view=azuresql
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2024-02-14T19:25:12.0733333+00:00

    Azure SQL Database don't support cross-database-access, so you can't solve it in plain SQL. You have to use ADF = Azure Data Factory. https://learn.microsoft.com/en-us/azure/data-factory/


  2. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2024-02-15T02:41:32.46+00:00

    You can do that using Elastic Queries, with them you can query an Azure SQL Database from another Azure SQL Database. However, with Azure Data Factory (ADF) you may have a better performance. You can do incremental loading of data using ADF.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.