|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
How to recover a database?
I had MS SQL installed on my comp.I had to reformat my hard drive due to some problems.There was a db in the sql server which i needed.So i saved the .mdf & .sdf files.Then i installed sql server in the formatted hard drive & pasted the .mdf & .ldf files in the Data forlder in MSSQL folder.But the problem is that even after doing this the enterprise manager doesnt show that database.Can anyone help me with this?Is there any way to recover the database?
Thanks a lot P.S.- I also have whole of the earlier MSSQL folder present in the earlier program files backed up.Would that help in anyway. |
|
#2
|
|||
|
|||
|
Hmmmm...
I had to do this recently myself, but this is the sort of thing you do once and forget how you did it because you don't do it that often - if you are lucky. Try this:
I think I had to create a new database with the same name as the old one. Then locate the mdf and sdf files and replace them with the copies you made of your previous database. HTH Regards, WTG |
|
#3
|
|||
|
|||
|
If you have a backup of the database then the best thing is to recreate the emtpy database and then restore from your backup. sp_attach_db is used to reattach detached databases but may work in this stituation - worth a try. Also - do you have a backup of the master database as this obviously contains all the information on your previous configuration and what databases where on the server etc. Hope this is helpful. Checkout the SQL server books online.
|
|
#4
|
|||
|
|||
|
Thanks
Thanks a lot guys.U guys were of great help.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > How to recover a database? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|