Categories

.NET (1) CSS (5) OOP (1) PHP (2) SQL (5) SQL Server (8) TSQL (1)

Friday, December 2, 2011

Restoring SQL server database ".bak" file

Right click on the database tab –> All Tasks –> Restore Database –> From device –> Select Devices –> Add your .bak file. Click OK. 
Now click the options tab. Here you will see the logical file name of your database. At its right side there will be a physical path of this file. Make sure this path is redirecting to the location where your database files exist, normally default location is "C:\Program Files\Microsoft SQL Server\MSSQL\Data" at the end of this path concatenate your file name. After concatenation your path should be something like this

C:\Program Files\Microsoft SQL Server\MSSQL\Data\test.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\Data\test_Log.ldf.

Now click ok. Large databse normally takes lot of time.



No comments:

Post a Comment