Restoring a database

You can restore a database from a backup by using the Restore database function in SQL Server Management Studio. (Database backups are specified as a scheduled job in Windows Task Scheduler. See "Scheduled jobs in Windows Task Scheduler" on page 1 for further information.)

Restoring the latest database

Complete the following to restore a database from the latest backup:

Stop all services.

Open SQL Server Management Studio, enter your password if required and click Connect to access your SQL Server.

In the Object Explorer pane on the left, expand Databases, right-click the database you want to restore and click Tasks > Restore > Database to open the Restore Database dialog.

Under Source, select Database and click the database you want to restore in the dropdown list if it is not already selected.

Under Select the backup sets to restore, select the checkbox in the Restore column for the database you want to restore.

Click Options in the Select a page pane on the left.

On the Options page:

Under Restore options, select Overwrite the existing database (WITH REPLACE).

Under Restore As, browse to and select the location for the restored database file.

Under Recovery state, select Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored (RESTORE WITH RECOVERY).

Click OK to begin the restore operation.

A message indicates that the database has been restored successfully. If the restore operation is not successful, the database reverts to its original state.

Restart all services.

Restoring a specific database

Complete the following to restore a specific database:

Repeat steps 1 through 3 from "Restoring the latest database" above.

Under Source, select Device and click Browse to open the Select Backup Devices dialog.

Select File in Backup media type list if it is not already specified and then click Add to open the Locate Backup File dialog.

Navigate to and select the backup file you want to restore and click OK.

Verify that the file referenced in the Specify Backup dialog is the one you selected and click OK to return to the Restore Database dialog.

Under Select the backup sets to restore, select the checkbox in the Restore column for the database you are restoring.

Click Options in the Select a page pane on the left.

On the Options page:

Under Restore options, select Overwrite the existing database (WITH REPLACE).

Under Restore As, browse to and select the location for the restored database file.

Under Recovery state, select Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored (RESTORE WITH RECOVERY).

Click OK to begin the restore operation.

A message indicates that the database has been restored successfully. If the restore operation is not successful, the database reverts to its original state.

Restart all services.