Friday, May 30, 2008

Restoring an sql 2000 database from mdf file only

A few days back, a pc’s hard disk got infected with bad sectors. Old disks tend to do so. Anyway, I had to recover all the SQL server 2000 databases because nobody was keeping backups. Looking around the net I found the following steps which worked just fine for all my sql 2000 databases but not for the 2005 ones. So let’s get started. We do have the mdf file only. I assume the log file (ldf) is either corrupted or we couldn’t even recover it. That’s ok if you follow the next check list: