# Restoring a SQL Database from an On-Premises SQL Server to an Azure Cloud

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

When you restore a database from an on-premises SQL Server to an Azure SQL instance, you need to use a staging SQL instance as an intermediate step. This is because Azure SQL is a managed service and doesn't provide direct access to the underlying file system, preventing direct restoration from .bak files. The process involves the following steps:

1. Restoring the .bak file to a staging SQL Server instance on the access node.

2. Exporting the restored database from the staging instance to a .bacpac file.

3. Importing the .bacpac file into the Azure SQL instance.

You must have a SQL Server instance installed on the access node being used for the intermediate restore step. This enables you to configure the Staging instance and Staging path on access node fields in the Restore options window.

The destination instance must be the same version or a later version of SQL than the source instance.

## Procedure

1. From the Command Center navigation pane, go to Protect > Databases.

   The Overview page appears.

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

   The Backup content dialog box appears.

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

   The Restore options dialog box appears.

4. Select Out of place.

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

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

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

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

9. From the Staging instance list, select the staging instance.

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

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

11. If you want to rename the database, in the Data files section, type the new name for the database.

    If you change the name of the database to a name of a database that already exists on the destination instance, the database will be overwritten.

12. To specify the database pricing tier, in the Advanced options section, select the Database tier for the database.

    If you don't select a database pricing tier, the default Pricing Tier Standard S0 will be applied by default.

13. You can configure a schedule to repeat this restore operation. To create a schedule, do the following:

    1. Click Schedule.

       The Add schedule dialog box appears.

    2. In the Name box, type a name for the schedule.

    3. Configure the Frequency and Repeat parameters.

    4. To specify exceptions to the schedule, click Exceptions.

       The Exceptions dialog box appears.

    5. Configure the exception parameters:

       - You can click Add Exception to save a set of exception parameters and continue adding sets of exception parameters.

       - Click Save when you have finished configuring the exception parameters.

    6. Under the Range of recurrence section, specify the Start date and End date to schedule the recurrence range of the restore operation.

    7. To save the schedule and return to the restore dialog box, click Schedule.

14. Click SUBMIT.

×

Loading...