Migrating an SQL Database from an On-Premises SQL Server to an Azure SQL Managed Instance

You can migrate a SQL database from an on-premises SQL server to an Azure SQL managed instance. To perform the migration, you restore the SQL database to the Azure SQL managed instance.

Note:The proxy instance (specified by the Staging Server box in the SQL Restore Options window) must be the same version or a more recent version of SQL than the source instance.

Procedure

  1. If the source database is protected by Transparent Data Encryption (TDE), migrate the certificate from the on-premises SQL server to both the on-premises proxy SQL server and the Azure SQL managed instance.

    1. To migrate the certificate of a TDE-protected database to an on-premises proxy SQL server, physically copy the certificate (.cer) and private key (.pvk) files from the source server to the proxy server.

      For information about migrating the certificate to the Azure SQL managed instance, see Migrate certificate of TDE protected database to Azure SQL Database Managed Instance in the Microsoft documentation.

    2. Create the master key and the certificate on the proxy server in the same way as is done for the destination server of a regular TDE restore.

      For more information about creating the master key and creating the certificate, see the Microsoft documentation CREATE MASTER KEY and CREATE CERTIFICATE.

  2. From the CommCell Browser, click Client Computers > client > SQL Server.

  3. Right-click the on-premise SQL instance from which you want to restore the data, and then click All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  4. Click View Content.

  5. Select the data that you want to restore, and then click Recover All Selected.

    The SQL Restore Options dialog box appears.

  6. On the General tab, complete the following steps:

    1. From the Destination Client list, select the Azure destination client to which you want to restore the data.

    2. From the Destination Server list, select the Azure SQL database managed instance to which you want to restore the data.

    3. From the Proxy Client list, select the proxy server that you want to use for the restore.

    4. To overwrite the files of any other database that is currently using the database that you specify, select the Unconditionally overwrite existing databases or files check box.

    5. In the Staging path on Proxy Client box, enter the location where you want to stage the managed Azure backup file.

      The proxy server must have at least twice the amount of disk space as the size of the database that you want to migrate.

    6. In the box listing the database and its files, you can rename the database in the Database column, but you cannot change the filename in the Physical Path column.

  7. On the Job Initiation tab, choose whether to run the restore job immediately or on a schedule.

If you run the restore job immediately, you can monitor the progress of the restore job in the Job Controller window. For more information, see Job Controller.

After the restore job is complete, you can view the restore job history. For more information, see Job History.

×

Loading...