Backup detected log corruption,what is the best way to recover the database


Recently I was asked this question by a user.His backup detected log corruption and he was looking for the safest way to recover from the error.

As the error was related to disk,he should move the log file to a different disk which is in good condition.

Solution to the problem is –

As there is corrupted data in the log mostly because of disk errors,we will need to throw that data away.

We have to analyze why there was a disk error and for this we can check windows event logs and any hardware logs.

Immediate fix will be –

Disconnect all users.

Switch to the SIMPLE recovery model.

Add a file to a new drive.

Switch to the FULL recovery model.

Take Full database backup.

Start log backups.

 

Advertisements