Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 04 - Migrate database to Azure SQL MI

Introduction

Tailspin Toys wants to migrate their on-premises SQL Server database to Azure SQL Managed Instance. In this task you will do the actual Migration to Azure SQL Managed Instances.

Description

In this task, you will use the Azure Data Studio migration extension to Migrate the database to Azure SQL MI.

The key tasks are as follows:

  1. Migrate the database to Azure SQL MI using Azure Data Studio.
  2. Confirm the Azure SQL MI database is in Online status.

Success Criteria

  • Migrate the database to Azure SQL MI.
  • Azure SQL MI database is in Online status.

Solution

Expand this section to view the solution
  1. Within Azure Data Studio, under the list of servers, right-click the localhost, WideWorldImporters server, then select Manage.

    localhost server is highlighted with right-click menu shown with the Manage option highlighted.

  2. Select the Azure SQL Migration option.

    The Manage server pane is shown with the Azure SQL Migration option highlighted.

  3. Select the Migrate to Azure SQL button.

    The Azure SQL Migration pane is shown with the Migrate to Azure SQL button highlighted.

  4. In Step 1: Databases for assessment, select the WideWorldImporters database, then select Next.

    Step 1 Database for assessment step is shown with the WideWorldImporters database selected for assessment.

  5. In Step 2: Assessment summary and SKU recommendations, review the summary and recommendations, then select Next.

    Step 2 Assessment summary and SKU recommendations are shown.

  6. In Step 3: Target platform & assessment results, select the target type as Azure SQL Managed Instance, select the WideWorldImporters database and you should see a message stating, “Total issues found: 0”, then select Next.

    Step 3 Target platform & assessment results are shown.

  7. In Step 4: Azure SQL target, enter connection information to your Azure Subscription and for Azure SQL Manage Instance the resource you created (named similar to tailspin-sqlmi), then select Next.

    Step 4 Azure SQL target is shown with the Azure account entered and the Location, Resource group, and Azure SQL Managed Instance resource selected as the target for the migration.

    If the Azure SQL Managed Instance is not showing as available in the application, but showing as Ready on the Azure Portal, restart the instance in the Azure Portal and reload this screen.

  8. On Step 5: Azure Database Migration Service, keep Online migration selected.

    Step 5 Migration mode is shown with the Online migration option selected.

  9. In Select the location of the database backups to use during migration, select My database backups are in an Azure Storage Blob Container.

    Step 5 Database backup is shown with the 'My database backups are in an Azure Storage Blob Container' option selected, with the Storage account and sql-backup container selected for the location of the source database.

  10. Select Create new under Azure Database Migration Service.

    Step 5 Azure Database Migration Service is shown with the Create new link under Azure Database Migration Service highlighted.

  11. In the Create Azure Database Migration Service pane, enter the following values, then select Create.

    • Resource group: Select the Resource Group for this lab, for example: tailspin-rg.
    • Name: tailspin-sql-migration

    Step 5 The Create Database Migration Service dialog is shown with Resource Group and Name for the Azure Database Migration Service to create entered.

  12. Once the Database Migration Service has been created, select Done.

    If you encounter an Error, dismiss it by closing the message.

    A tool internal display error is shown.

  13. Select the Azure Database Migration Service that was created, then select Next.

    Step 5 Azure Database Migration Service is shown with the Azure Database Migration Service field now entered.

  14. In Step 6: Data source configuration, select the Azure Storage Account and container created previously, then select Next.

    Step 6 Data source configuration is shown to select the storage account.

  15. In Step 7: Summary, review all the configurations chosen, then select Start migration.

    Step 7 Summary is shown with all the selected values displayed for review.

  16. Azure Data Studio will now show Database migrations in progress - 1.

    The Azure SQL Migration pane in Azure Data Studio shows there is 1 data migration in progress.

  17. In the Azure Portal, navigate to the Azure Database Migration Service (named similar to tailspin-sql-migration), then select Migrations and the WideWorldImporters migration.

    The Azure Database Migration Service is shown within the Azure Portal displaying the new database migration in the list of Migrations.

  18. The WideWorldImporters migration shows the current status of the migration as InProgress or Ready for cutover. Notice the Currently restoring file should say All backups restored once the database backup has been restored. Then select Complete cutover at the top.

    The WideWorldImporters migration is shown within the Azure Portal having a migration status of InProgress

  19. In the Complete cutover prompt, select the box for I confirm there are no additional log backups…, then select Complete cutover.

    The Complete cutover prompt is shown with the confirmation box checked and the Complete cutover button highlighted.

  20. The WideWorldImporters Migration will now show the status of Completing. This will take a few minutes to complete.

    The WideWorldImporters migration is shown in the Azure Portal having a migration status of Completing.

  21. Once the cutover has been completed, the WideWorldImporters migration will show a status of Succeeded.

    The WideWorldImporters migration is shown in the Azure Portal with a migration status of succeeded.

  22. Within the Azure Portal, navigate to the Azure SQL Managed Instance created previously.

  23. When the SQL Server database migration to Azure SQL MI has completed, you will see the WideWorldImporters database shown with an Online status.

    The Azure SQL Managed Instance resource is shown in the Azure Portal with the WideWorldImporters migration showing a Status of Online.