The Macrium Reflect knowledgebase has been upgraded.
Please go here for the latest information.

Knowledgebase

How to Restore an SQL database

Expand / Collapse
 

How to Restore an SQL database



This article describes how to restore SQL databases from backups taken by Macrium Reflect Server Plus

Macrium Reflect Server Plus offers a rich feature set for restoring backups taken of SQL databases including:
  • Restore to previous backup time, point-in-time or current time.
  • Restore to different instance.
  • Restore MDF and LDF files to different folder.
  • Rename database on restore.


How to restore an SQL database to time of backup

To restore a database to its state at time of backup:
  1. Select the SQL Server Restore tab under the main Restore tab. This presents the following pane. If this is empty, no backups can be found in the search path and you need to click the Folders to search link to direct Reflect to the location of the SQL backup files.


  2. The left hand tree shows the databases that can be restored. Select the databases you wish to restore.

  3. The middle of the pane contains controls that allow you to choose the destination instance, database name and directory that contains the MDF and LDF files. The controls will automatically default to the instance, database name and directory for which the original backup was taken. The latest backup is also selected. If you wish to restore to a different backup click the Select time... link and select the backup you wish to restore to.

  4. When you are happy with the selection, click the Restore button.

  5. You will be presented with a summary of the Restore to be carried out. Once reviewed, click Restore.


How to restore a database to a point-in-time

In some circumstances, it is possible to restore a database to a specific point-in-time. This is especially useful if you have accidentally deleted a table or other specific piece of data and need to roll back to the point just before the delete was done. The following situations must be considered when trying to restore to a point-in-time:
  • The database must be running the FULL recovery model.
  • It is not possible to restore to a point-in-time prior to the last full or differential backup.
  • It is not possible to restore to a point-in-time between full or differential images. You can restore to a point-in-time from the last full or differential to the present.
In order to restore to a point-in-time, 
  1. Follow steps 1 to 3 above.

  2. When you click Select time... you are presented with the following dialog which shows the history of backups made for the selected database

    This contains three radio buttons. In order to restore to a point-in-time, select the bottom radio button

  3. Next, select the time you wish to restore to. You can do this by either setting the time and date manually, or you can select the backup you wish to restore and then tweak the date/time as required. It is not possible to set the controls to a date / time that can not be restored. Click OK.


How to restore to a different instance, directory or database name

Restore to a different instance
It is possible to restore a backup to a different instance by selecting the target instance in the Instance drop down combo box. Please be aware that there may be compatibility issues with restoring databases to Microsoft SQL instances of differing versions.

Rename upon restore (copy)
By default, Reflect will restore the database back to the original database name. However, if you change the name of the database in the Target database name edit box, a new database of that name will be created. The MDF and LDF files that are restored are also renamed. This ensures that the original database is not changed but can be deleted manually afterwards if it is no longer required.

Restore to a different directory
By default, the directory selected in the Restore to directory edit box is the default directory where the instance will place MDF and LDF files associated with the databases. If you change the directory, upon restoration, the MDF and LDF files will be moved to the target directory from wherever they were to start with.
Details
Last Modified:24 Jun 2014

Last Modified By: Scott

Type: Tutorial

Article not rated yet.

Article has been viewed 2,716 times.

Options