When you run a verify/repair on your data file and find that it is damaged, take a look at the generated log. If you find an error message that indicates the issue lies within a single table, you can try the following troubleshooting options.
**As always, the first step to take to restore from a backup; then, run a standard repair if the restore does not work. The options outlines below should only be used if the data file is severely damaged.
1) Recover by record headers
If the standard repair function does not solve the issue, try using the Recover by record headers option. This runs a complete scan over all the tables in the database in reference to each of their address tables (which the standard repair does not do).
2) Export, truncate, repair and compact
You can follow the steps below to clean up your data file:
- Export all of the data into text format.
- Run the TRUNCATE TABLE command on the table is causing issues.
- Run a standard repair.
- Run a compact.
- Then, reimport the data you just exported into text format.