How-to Restore a SQL Database to a Windows Virtual Machine
  • 11 Feb 2022
  • Dark
    Light

How-to Restore a SQL Database to a Windows Virtual Machine

  • Dark
    Light

Article Summary

Introduction

SQL databases are restored when they need to be returned to a specific point or recovered entirely. You can initiate a restore task to recover the database to the original or an alternate virtual machine. 

Procedure

  1. Log in to the Cloud Data Protection system.
  2. Select the Data Protection Recoveries tab from the navigation bar at the top of the page.
  3. Select the Recover button and then MS SQL.
     
  4. Utilize the search utility to locate the SQL server or database to be restored
    1. Wildcards and partial names are supported.
  5. Click the desired database to restore and choose the snapshot you wish to recover from

6. Configure the restore on the Recovery Options page

    1. Task Name:        Select a meaningful name for the recovery task
    2. Recovered:         Confirm the database you wish to recover
    3. Recover Point:   Select the snapshot you want to recover from
    4. Instance:             Select if you are restoring to the Original SQL Host and Instance or another one
    5. Location:            Select where to restore the database to on the server
If you are restoring an AAG and overwriting the original database, additional actions are required.

See Section on Additional Recovery Steps for Always-on Availability Groups

    1. Name:                 Select a name for the database
    2. Recovery:           Select if you wish to perform the restore WITH RECOVERY
    3. Interface:           If restoring to EEC, choose Select from Interface/VLANs and select bond0.1930 (bond0.1940 will alternatively be selected on DUB-COHESITY); if restoring to private infrastructure, select Select from Interface/VLANs and select the appropriate bond0.* interface.

  1. Select Recover
  2. Upon the success of the restore, you will have the database restored to the location specified on the Recovery Options page.

Additional Recovery Steps for Always-on Availability Groups

When attempting to restore an AAG by overwriting the original database, it will show the following:

Before you select the Check Box and click OK, you will need to break the AAG manually:

  1. Log in to a server with SQL Server Management Studio (SSMS) installed with access to manage the applicable database
  2. Launch SSMS and connect to the database
  3. Navigate to the AAG by selecting Always On High Availability → Availability Groups → Availability Databases
  4. Right Click the respective database and select Remove Database from Availability Group.
  5. Confirm you have removed the correct database and select OK
  6. Verify that the database is no longer listed in the Availability Group and proceed with the restore.

 

Upon completion of the restore, you may wish to return the database to the Availability Group:

  1. Log in to a server with SQL Server Management Studio (SSMS) installed with access to manage the applicable database
  2. Launch SSMS and connect to the database
  3. Navigate to the AAG by selecting Always On High Availability → Availability Groups → Availability Databases
  4. Right Click the Availability Databases folder and select Add Database
  5. Step through the menu, setting the appropriate database and replica server.
  6. Select your seeding method.
  7. Select Finish.
  8. Verify the database synchronizes properly between AAG members.

Once you have fully recovered your database(s), make sure to refresh the AAG configuration within the protection job otherwise, backup operations can fail:

  1. Log in to the respective Cloud Data Protection system
  2. From the navigation bar at the top of the page, select the ProtectionSources tab
  3. Locate the SQL protection job, select the Context Menu Icon (), and the Edit
      
  4. Select Edit Objects
     
     
  5. Select Refresh, verify the correct databases are showing as recognized, and select Add
     
     
  6. Select Protect

Was this article helpful?