Recover database (SQL Server) from Windows.old folder

0

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.

erikric

Posted 2010-09-20T11:58:01.680

Reputation: 353

Answers

1

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).

Adrien

Posted 2010-09-20T11:58:01.680

Reputation: 1 374

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 – 2010-10-14T09:16:10.087