Wednesday, 13 May 2015

How to restore the sample database(.bak file) in SQL Server?

How to restore the sample database(.bak file) in SQL Server?


Download the sample database zip file and unzip the .bak file inside. Place the .bak file in your SQL Server backup folder. If you have not changed anything during installation it should be in C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012EXPRESS\MSSQL\Backup. Now go to your SQL Server 2012 instance, open up the Object Explorer [F8] (if it is not opened already) and right click on the Database folder. In the context menu go to Restore Database.


You should now be in the Restore database window.


Click on "Device" and then click on the button behind it. You should now see the Select backup devices window. Click "Add" and browse to the .bak file you just unzipped (if you don't see it immediately). Select the .bak file and click "OK". Make sure you have no other files selected in the Select backup devices window. Click "OK" and you should be back in the Restore database window. You can review your options and click "OK" again. The AdventureWorks database should now be restored and ready for use.




No comments:

Post a Comment