Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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