Copies before commandsWe create read-only forensic copies of all logs, LDF, NDF, MDF and EDB files before allowing any tools to operate. Database engines are very aggressive in writing during 'repair', and the copy is what allows us to reverse every single action we take afterwards.
The repair switch that deletesSQL's REPAIR_ALLOW_DATA_LOSS has an unusually honest name: it accomplishes consistency through eliminating everything it cannot reconcile. We rarely run REPAIR_ALLOW_DATA_LOSS, and if we do, it is only on a copy, never as our first line of defence.
Exchange's gentle question firstA built-in check will scan an EDB’s header for its shutdown state, required log range and damage level without altering one single byte of it. The nasty cousin of that check, the hard repair, erases all unreadable pages and compels the migration process to occur. Always diagnose prior to doing surgery.
The storage truth beneathMost 'corrupted databases' are just a storage problem dressed up as a database problem: a dropped RAID member, a sudden loss of power during a flush operation, or a bad snapshot. Therefore we have to take care of the floor (storage) before we worry about fixing the furniture (the database), which is why this page and our server page sit next to each other.