Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

How to restore mdf file in sql server 2005?

mdf

Best Answer williamrosser85 , 17 May 2015 - 03:46 AM

If the older version was properly shut down, you should just be able to attach them.  Worst case, install the old version to another system, attach the files there, do a backup, and then resto... Go to the full post »


  • Please log in to reply

#1
robdalas

robdalas

    New Member

  • Member
  • Pip
  • 1 posts

I stupidly forgot to back up my DB before uninstalling and then re-installing a more up-to-date version of SQL Server Express (2008 R2).  I still have the .mdf and .ldf  files in the Data folder of the older version but don't know how to restore using these.  I tried copying them into the Data folder of the R2 version and using the Attach option but it came up with an error. What am I doing wrong??


  • 0

Advertisements


#2
williamrosser85

williamrosser85

    New Member

  • Member
  • Pip
  • 2 posts
✓  Best Answer

If the older version was properly shut down, you should just be able to attach them.  Worst case, install the old version to another system, attach the files there, do a backup, and then restore them onto the new machine.
It might help knowing what error you are getting too.
or

Here are details that cover parts 2) and 3) in case re-creating log doesn’t work which can happen if MDF file is corrupted.

You can recover data and structure only by reading MDF file with some third party tool that can de-code what’s written as binary data but even with such tools you can’t always do the job completely.

In such cases you can try SQL Server Restore Toolbox. From what I know this is the only tool that can do this kind of job but it’s quite expensive.

http://www.sqlserver.restoretools.com/

Much better idea is to try to recover these from any old backups if you have any


  • 2






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP