Damaged .mdf and no up to date Backup

LilithyanLilithyan Member Posts: 32
Hello,

One of our customers has currently a rather large problem with his SQL Navision Database and it's frustrating to no end.

The problem:
Last week Tuesday (20.07.) the employees of our customer noticed that they were unable to access a certain table and its contents. The administrator was at that time on holiday so we immediately got the call for help. Turns out that the hard drive was damaged sometime on the weekend (17./18.07) before and now the .mdf file of the database was faulty, denying access to some of the tables.
When the administrator was back from his holiday, had exchanged the hard drives and established the full backup from the Friday before that fateful weekend (16.07.), one of my colleagues and I drove to the firm to help insert the needed log files into the backup, going from Monday after the incident to now (19.07. – 29.07.).
The really big problem made itself known, when we tried to insert the first log file, because SQL Server Management Studio insisted, that the log file wasn’t the oldest file needed for the full backup from Friday, 16.07.
Upon checking, it was discovered that another full backup had been made during the weekend on Saturday (17.07.) and another on Sunday (18.07.) which was damaged due to the then damaged hard drive and .mdf file. The thing is, on weekends the full backups aren’t saved separately on an external data source and the damaged one from Sunday overwrote the working one from Saturday! And we don’t have any log files going farther back than the Monday after the damaged full backup!

The Question:
Which is the best way to get a fully working database again? Is it possible to trick the existing log files into being written into the full backup from Friday, so the changes and new data saved within aren’t lost?

Hope someone has an idea what to do, and many thanks in advance!

Ciao,

Lilithyan

Comments

  • rdebathrdebath Member Posts: 383
    It doesn't matter when the last full backup of the database happened. To do an SQL restore you need:
    1. Any full backup.
    2. Every single transaction log backup made since the full backup.

    You then restore all those backups in the order they were taken.

    You cannot 'trick' the restore if logs are missing as the data you want is missing too.
Sign In or Register to comment.