Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed Windows 7 on a machine which previously ran Windows XP. The old installation had a database which I need a copy of, but of course I did not think far enough ahead to do a backup before I installed the new OS.

So, the question is, is it possible to recover the old database without having a backup file? I tried to copy the files from the Data folder, but this did not work.

share|improve this question
up vote 1 down vote accepted

Which version and edition of SQL server? Did you try to attach the database, or did you just copy the files and hope the server would see them?

I've only ever seen this happen with a machine that was running MSDE. When the W7 upgrade ran, it did not shut MSDE down gracefully, nor did it disconnect it cleanly*. The really short version of a painfully long story: we had to roll the machine back to the last image that the client had of it with XP, then do it the right way. I had no luck salvaging the original MDF.

Please provide more information on your version of SQL and what, exactly, you've tried, and I'll try to provide more help.

*(The MDF file was left in a read-only state, and possibly corrupted. SQL 2k5 won't attach an MDF that's read-only; reinstalling MSDE and attempting to reattach also didn't work (the possible corruption).

share|improve this answer
Turned out not to be an issue since the application created new tables as long as it had a DB with the right name. But thanx anyway. Good knowledge to bring with me. – erikric Oct 14 '10 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .