In the previous article, we discussed the Azure SQL Migration extension in Azure Data Studio and how it enables both online and offline database migrations to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines. In this article, we will focus on offline migrations and explore the steps involved in migrating a database to Azure SQL Managed Instance and SQL Server on Azure Virtual Machines.
Offline Migration to Azure SQL Managed Instance
An offline migration is suitable for applications that can tolerate extended downtime. In this type of migration, the application downtime begins when the database migration starts and lasts until the database is restored to its target.
The migration process consists of several steps:
- Choose the Azure account under which the migration will run.
- Select the database or databases to be migrated.
- Choose the Azure SQL target, in this case, Azure SQL Managed Instance.
- Select the migration mode, which is offline in this scenario.
- Specify the location of the source database backups, which are stored in an Azure Storage Blob Container.
- Select the Resource Group containing the Azure Database Migration Service and the service itself.
- Review the migration summary and start the migration.
Once the migration is initiated, the Azure Data Studio will display the migration status, and the database backup files will be restored on the target Azure SQL Managed Instance. The database will then be online and ready for use.
Offline Migration to SQL Server on Azure Virtual Machine
For migrating a database to SQL Server on Azure Virtual Machines, an offline migration process is also used. However, there are a few additional steps involved:
- Ensure that the SQL IaaS Agent extension is installed and registered on the Azure Virtual Machine running the target SQL Server instance.
- Select SQL Server on Azure Virtual Machine (IaaS) as the target.
- Select the Resource Group and the name of the Azure Virtual Machine running the target SQL instance.
After completing these steps, the migration process is similar to the offline migration to Azure SQL Managed Instance.
Conclusion
In this article, we explored the process of performing offline migrations using the Azure SQL Migration extension in Azure Data Studio. We covered two scenarios: migrating a database to Azure SQL Managed Instance and migrating a database to SQL Server on Azure Virtual Machine. The Azure SQL Migration extension is a valuable tool for simplifying the migration process and it will be interesting to see how it evolves in the future.
Thank you for reading!