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

One thought on “Backup detected log corruption,what is the best way to recover the database

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s