How to Repair a Corrupt Table

From support-works
Revision as of 09:25, 31 August 2018 by Pamelal (talk | contribs) (Created page with "{{Template:Basic Cover |title=How to Repair a Corrupt Table |type=FAQ |htl=Y }} {{Template:Basic Status |status=Published |version=1.0 |authors=Hornbill Support |applicableto...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



Status: Published
Version: 1.0
Authors: Hornbill Support
Applies to: Supportworks ESP 8.x, MariaDB


How to Repair a Corrupt Table

This document details how to resolve an issue with a corrupt index file (extension .MYI) in the MySQL database. The error is reported as follows in the SwServer log file:

Can't open file: 'TABLE-NAME.MYI'. (errno: 145)

In order to resolve this, please follow the instructions below:

  1. Run the Supportworks Server Configuration utility. (Start > Programs > Supportworks Server > Supportworks Server Configuration.)
  2. On the Server tab, stop all services as listed below.
    • SwAdminService
    • SwCalendarService
    • SwFileService
    • SwIndexServer
    • SwLogService
    • SwMailSchedule
    • SwMailService
    • SwMessengerService
    • SwSchedulerService
    • SwServerService
  3. From the MS Windows Control Panel, stop the MariaDB service and Apache services.
  4. Make a copy of the corrupt .MYI file, .frm and its associated .MYD file. (Found in C:\Program Files\Hornbill\Core Services\SwSqlServer\data\database.)
  5. Restart the MariaDB service.
  6. Run the Interactive SQL program. (Start > Programs > Hornbill Core Services > Interactive SQL.)
  7. Enter the following, replacing database and table-name with the appropriate values.
    use database;
    repair table table-name;
  8. Be sure to include the semi colon at the end of each statement above otherwise the command will not execute.
  9. Take a copy of the results returned. The table should now have been repaired.
  10. From the MS Windows Control Panel, restart the Apache service.
  11. On the Server tab of the Server Configuration utility, restart all remaining services as listed below.
    • SwServerService
    • SwSchedulerService
    • SwMessengerService
    • SwMailService
    • SwMailSchedule
    • SwLogService
    • SwIndexServer
    • SwFileService
    • SwCalendarService
    • SwAdminService


Should you require any further information feel free to contact the Support team using the web form https://support-works.com/support/