How to migrate some databases sources from a directory active to another

Laura Alvarez 20 Reputation points
2024-09-05T15:31:20.43+00:00

I need to migrate two SQL databases from a subscription located in one Azure Active Directory (tenant) to another directory (tenant). The databases are live, receiving incoming data. I initially attempted to use Azure Database Migration Service (DMS) and Azure Data Factory, but they have limitations when it comes to migrating between different tenants.

I am seeking confirmation on which service is best suited for handling this cross-tenant migration while maintaining application availability and data integrity during the process. Managing downtime and ensuring continuous data synchronization is critical due to the active nature of the databases.

Azure SQL Database
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,515 questions
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
532 questions
{count} votes

Accepted answer
  1. Nandan Hegde 32,256 Reputation points MVP
    2024-09-06T04:09:14.9633333+00:00

    Below MSFT documentation serves as the guide for cloning of database across diff tenant.

    https://techcommunity.microsoft.com/t5/azure-database-support-blog/how-to-copy-azure-sql-database-to-a-different-subscription-and/ba-p/3965985

    and the performance aspects

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Neuvi Jiang 1,300 Reputation points Microsoft Vendor
    2024-09-06T02:35:51.2833333+00:00

    Hi Laura Alvarez,

    Thank you for posting in the Microsoft Community Forums.

    1. Evaluate existing tools and services

    Azure Database Migration Service (DMS): While DMS is a powerful tool that supports a wide range of database migration scenarios, it does suffer from the limitations of inter-tenant migrations.DMS is primarily designed for migrations within the same tenant, and therefore may not be the best choice for cross-tenant migrations.

    Azure Data Factory (ADF): ADF is primarily used for data integration and ETL operations, and while it supports cross-tenant data movement, it may not be specifically designed for database migration, especially in scenarios where database integrity and real-time performance need to be maintained.

    1. Recommended migration strategies

    Use TSQL to replicate the database:

    By writing TSQL scripts, you can replicate databases across tenants to servers under different subscriptions or resource groups. This approach is flexible, supports cross-subscription migration, requires no additional tools, but requires additional privilege configuration and SQL authentication.

    Benefits: Flexible, supports cross-subscription migration, no additional tools required.

    Limitations: Requires additional permissions configuration and SQL authentication.

    Use Database Backup and Restore:

    Back up the database as a BACPAC file, then upload it to Azure Storage and restore it in the target tenant. This method is suitable for small-scale database backups and migrations.

    Benefits: Easy to use, suitable for any SQL Database recovery.

    Limitations: Export is limited to a single database, not suitable for large-scale data volume databases or synchronized multi-database migration.

    Transaction Replication:

    Transactional replication is a method of moving data between continuously connected database servers, ideal for online or offline migration of large and complex databases.

    Benefit: Supports real-time data synchronization for large and complex databases.

    Limitations: Relatively complex configuration, need to ensure that the network connection between the source and target database is stable.

    1. Maintain application availability and data integrity

    Minimize downtime: If possible, try to migrate during low business peak hours to minimize the impact on applications.

    Data synchronization: Ensure data synchronization between the source and target databases during the migration process. If transactional replication is used, make sure there are no delays or errors in the replication process.

    Rollback plan: Develop a detailed rollback plan so that you can quickly revert to the original state if problems occur during the migration.

    Testing: Before migration, simulate the migration process in a test environment to ensure that everything works as expected.

    1. Additional Considerations

    Security: Ensure that all relevant security best practices are adhered to during the migration process, including data encryption and access control.

    Compliance: Ensure that the migration process meets all applicable legal and regulatory requirements.

    In summary, for the need to migrate live SQL databases across tenants and maintain application availability and data integrity, a TSQL replicated database or transactional replication approach is recommended. These approaches offer flexibility and the ability to synchronize real-time data, but also require careful planning and execution to ensure success.

    Best regards

    Neuvi

    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.