How to create and migrate the tables from one azure database to another azure database

Rahul 251 Reputation points
2024-05-08T08:29:13.6433333+00:00

Use-Case- I have 130 tables in the Azure sql database, I need to create and migrate the 130 tables to another azure sql database. Can I use the Azure data factory auto-create functionality to migrate those 130 tables. How the primary keys and indexes of the tables are migrated. please suggest

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,695 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Marcin Policht 13,020 Reputation points MVP
    2024-05-08T08:58:07.1066667+00:00

    Follow https://learn.microsoft.com/en-us/answers/questions/1096315/how-to-copy-table-from-one-azure-sql-db-to-another or https://stackoverflow.com/questions/6572754/sql-azure-copy-table-between-databases


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. ShaktiSingh-MSFT 13,836 Reputation points Microsoft Employee
    2024-05-08T09:10:30.8266667+00:00

    Hi Rahul •,

    Welcome to Microsoft Q&A forum.

    As I understand, you want to know copy few tables from one Azure SQL Database to another DB.

    Could you please confirm if the transfer needs to be done in the SQL Server/Subscription or to different?

    1). Generate Scripts

    This option present in SSMS could be used as described here in detail step by step: https://www.sqlshack.com/how-to-copy-tables-from-one-database-to-another-in-sql-server/

    2). If you want to Copy Entire Database, you can do so via Azure Portal, CLI or Powershell as mentioned here: https://learn.microsoft.com/en-us/azure/azure-sql/database/database-copy?view=azuresql&tabs=azure-powershell

    3). Azure Data Factory could also be used.

    Let us know if you have any specific query. Thanks

    0 comments No comments

  3. Alberto Morillo 32,981 Reputation points MVP
    2024-05-09T13:23:39.61+00:00

    You have other options. You can use Azure SQL Data Sync to copy the data between the databases and it supports Private Link. It will use BULK INSERT on the destination database. Script the schema of the tables and create them empty on the destination database and let SQL Data Sync do the job. Scale up the service tiers of the databases while the data migration operation is in progress.

    This tool named SQL Compare can help you do the job with ease. Another commercial alternative you can test and will probably fit your requirements is Symmetric DS. It works very well with Azure SQL databases. Download a trial version of these tools and you won't be disappointed.

    0 comments No comments