Migrating a 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.


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.


  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 navigation pane, go to Protect > Databases.

    The Overview page appears.

  3. On the Instances tab, in the row for the on-premises SQL server instance, click the action button action_button, and then click Restore.

    The Backup content dialog box appears.

  4. Select the content to restore, and then click Restore.

    The Restore options dialog box appears.

  5. Select Out of place.

  6. From the Restore type list, select Cross instance restore.

  7. From the Destination server list, select the database server that has SQL server instance.

  8. From the Destination instance list, select the on-premise SQL server to which you want to restore the data.

  9. From the Access node list, select the access node.

  10. In the Staging path on destination server box, enter the location where you want to stage the Azure BACPAC file.

  11. Enter additional details so that the restore operation completes successfully:

    • Enter a location that is on the destination server.

    • Rename the database and the physical files.

    Verify that you have sufficient space in the staging path for the restore operation.

  12. Click Submit.