1

A database in simple recovery model cannot have log backups.

In this situation what is the way to handle corruptions reported by dbcc checkdb without data loss?

The documentation says:

Use the REPAIR options only as a last resort.

The only repair option to resolve corruption is: REPAIR_REBUILD.

Considering that the above is the last resort, or say the corruption is on data page (so the REPAIR_REBUILD is of no use), then what is the initial approach to attempt to fix corruption?

4
  • 8
    If you choose the simple recovery model, you've chosen that the data isn't that important. The answer to all corruption fixes is restore from a backup. You don't want to lose data but also are using the simple recovery model, these are mutually exclusive in all but a few cases. Commented Sep 27, 2022 at 21:04
  • 1
    Just restore from your most recent full backup (you can still do full backups in SIMPLE). Putting it in that recovery model says that you want to preserve data up to the previous backup, so that is what you get Commented Sep 28, 2022 at 10:46
  • 2
    So assuming full backup is done everyday, then the data loss is upto last full backup provided dbcc checkdb is run everyday. Correct? Commented Sep 28, 2022 at 11:01
  • You can attempt a rebuild. It might work. Depends on the corruption. If you don't have backups, you're going to lose data anyway. Might as well go for it. Commented Feb 28, 2024 at 13:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.