< event=""> returned status of 'error' from CHECK TABLE operation indicating corruption." in my Spectrum tomcat log file?" />
During Spectrum OneClick startup, database files are put through a checking process that will look for corruption issues. If any corruption issues are detected, an error message displays in the stdout.log or catalina.out depending on your OS. The error message will contain the table that needs to be repaired.
To repair the database
- Shut down Spectrum Tomcat Service
- Shut down Spectrum MySQL Service
- Navigate into the $SPECROOT/mysql/bin directory using a bash shell
- Type the following command: ./myisamchk --sort_buffer_size=500M -n ../data/reporting/*.MYI
Where * is equal to the filename reported in the error.
In our example error, it is "event" so the command would look like this:
./myisamchk --sort_buffer_size=500M -n ../data/reporting/event.MYI
Note: Make sure there is at least 1.5 times the disk space of the table being repaired because the repair utility rebuilds the table by creating a like copy.
Run this command for each of the tables returned in the errors.
If there are many tables, use the first command with the *.MYI to repair them all as a wildcard.
Be aware that limiting the repair to one table will run faster.