May 3, 2007 at 7:57 am
I forgot to backup a database before uninstalling SQL server. Fortunately I still have a very old backup and the .mdf and .ldf files on the server. Is there any way to restore the database using the very old backup but use the .mdf and .ldf files (from today) to restore the database. I need the newest data in the database.
Can this be done and if so, what are the steps?
THanks a bunch!
May 3, 2007 at 8:04 am
You could try to reattach the database using the .mdf and .ldf files but I cannot remember if this works with unattached databases
Far away is close at hand in the images of elsewhere.
Anon.
May 3, 2007 at 8:13 am
Hmmmm, good point. What if I restored the very old backup, with a different .mdf and .ldf files name. THen reattched it with the .mdf and .ldf files from today. Would that work?
May 3, 2007 at 8:15 am
Hello,
You can restore the database with the backup file you have. Note down the drive location where you are restoring this database to. Now detach the database and overwrite the .mdf and .ldf files with the one you have. Then you attach back the database.
Note: The restored database files and the individual files (.mdf and .ldf) should be identical in their filenames.
Hope this helps you.
Thanks
Lucky
May 3, 2007 at 9:23 am
Thanks for your input everyone. I was actually able to retach the dabatbase from Enterprise manager just be right clicking and attaching. All I had to do was give the location of the .mdf file and it found the .ldf file on it's own and restore the database with it's original name. THanks for al your help.
May 21, 2007 at 3:09 am
Yes, By using Sql Server Enterprise Manager. Using Attach Database option.
January 2, 2009 at 2:08 pm
You guys are life-savers. It is the holidays and all of our DBAs are out of the office. DB Instance crashed and could not repair. I ended up uninstalling and re-installing. The replies here allowed me to reattach all of the databases.
Thanks!!!
January 4, 2009 at 4:16 pm
u can do the restoration tasks with particular extensions and should check the file location where u have to restore
July 21, 2009 at 7:19 pm
this was an awesome contribution
thanks alot
January 17, 2011 at 3:21 am
If you have forgotten to backup database before uninstalling SQL server. Then there is very little chance to restore .mdf data using very old backup. But do not lose hope there is still a way to perform mdf repair and restore use third party tool known as SQL Repair software with this you will surely restore the deleted data.
😛
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply