Thursday, June 11, 2009

Restoring a .bak file to a SQL Server database

source: http://blog.sharepointdevelopment.nl/post/Restoring-a-bak-file-to-a-SQL-Server-database.aspx
Author:Nick Boumans

Sometimes you have to restore a .bak file to a SQL Server database where the .bak file was not originally back-upped from. You can do this either by a script or using SQL Server Management studio. By using Management Studio, you have to follow the next steps:

- Open SQL Server Management Studio (either Enterprise or Express)
- Right Click Databases -> Restore Database…
- Select your To Database e.g. OrdersNew
- Select from device and select your .bak file
- Move to the item options (you're standard in General)
- Check or the database paths are correct, otherwise correct them
- Go back to the general tab
- Check your database and hit the OK button

Vaibhav