Friday, December 26, 2008

How To Restore a Database from a Backup in SQL Server 2005

How To Restore a Database from a Backup in SQL Server 2005

Your database is down, your users are in a panic, what do you do?. If you have been performing routine backups of your database, you can restore it to the point of the most recent backup. To restore your database, follow these steps:

1. Open SQL Server 2005 Management Studio.

2. Connect to the appropriate server.

3. Expand Databases.

4. Right-click the desired database, mouseover Tasks, mouseover Restore and select Database.

5. The Restore Database window will appear.

6. Ensure that the correct database name appears in the To database field. If not, select it from the dropdown.

7. Under Source for restore, select the From device radio button.

8. Click the button next to the textbox to select the device to restore from.

9. The Specify Backup window will appear.

10. Click Add and locate and select the backup file from the Locate Backup File Window. Click OK.

11. Under Select the backup sets to restore, select all three backups (full, transaction log, and differential).

12. In the left pane, select Options.

13. Under Recovery state, ensure that the Restore with Recovery radio button is selected.

14. Click OK to begin restoring the database.

15. Once the restore is complete, a notification box will appear. Click OK to close the box. You have now restored your database to the most recent state.

No comments: