Difference between revisions of "Repairing a Corrupt Table"

From support-works
Jump to navigation Jump to search
(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...")
 
 
Line 14: Line 14:
  
 
== How to Repair a Corrupt Table ==
 
== 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)
+
This document details how to resolve an issue with a Corrupt Index in MariaDB. The error will be reported as follows in the log file
 +
   
 +
Can't open file: 'TABLENAME.MYD'. (errno: 145)
  
In order to resolve this, please follow the instructions below:
+
In order to resolve this please follow the instructions below:
 +
 +
1...Run the SupportWorks Server Configuration Program. (Start-> Programs->SupportWorks->SupportWorks Configuration Program.)
 +
2...On the Server TAB STOP all Services
 +
3...From the MS Windows Control Panel – STOP the the MariaDB Service.
 +
4...Make a copy of the Corrupt Database files, ie. .MYI, .MYD and .frm files belonging to that table.
 +
5...Re Start the MariaDB service
 +
6...Run the Support-Works Interactive SQL Program (Start->Programs->Hornbill Core Services ->Interactive SQL.)
  
# Run the Supportworks Server Configuration utility. (Start > Programs  > Supportworks Server > Supportworks Server Configuration.)
+
  7...Enter the following replacing DATABASE and TABLENAME with the appropriate values.  
# On the Server tab, stop all services as listed below.
+
 
#* SwAdminService
+
Use DATABASE;  
#* SwCalendarService
+
Repair Table TABLENAME;
#* SwFileService
+
#* SwIndexServer
+
8...Take a copy of the Results Returned. The table should now have been repaired.
#* SwLogService
+
#* SwMailSchedule
+
9...On the Server TAB start all remaining services.
#* SwMailService
 
#* SwMessengerService
 
#* SwSchedulerService
 
#* SwServerService
 
# From the MS Windows Control Panel, stop the MariaDB service and Apache services.
 
# 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''.)
 
# Restart the MariaDB service.
 
# Run the Interactive SQL program. (Start > Programs > Hornbill Core Services > Interactive SQL.)
 
# Enter the following, replacing <code>''database''</code> and <code>''table-name''</code> with the appropriate values.
 
#: <code>use ''database''; </code>
 
#: <code>repair table ''table-name'';</code>
 
# Be sure to include the semi colon at the end of each statement above otherwise the command will not execute.
 
# Take a copy of the results returned. The table should now have been repaired.  
 
# From the MS Windows Control Panel, restart the Apache service.
 
# 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/
+
Once done the Table will be repaired, should you require any further information and/or assistance please feel free to contact Hornbill Support using the webform https://support-works.com/support/

Latest revision as of 09:34, 31 August 2018



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 in MariaDB. The error will be reported as follows in the log file

Can't open file: 'TABLENAME.MYD'. (errno: 145)

In order to resolve this please follow the instructions below:

1...Run the SupportWorks Server Configuration Program. (Start-> Programs->SupportWorks->SupportWorks Configuration Program.)
2...On the Server TAB STOP all Services
3...From the MS Windows Control Panel – STOP the the MariaDB Service.
4...Make a copy of the Corrupt Database files, ie. .MYI, .MYD and .frm files belonging to that table.
5...Re Start the MariaDB service
6...Run the Support-Works Interactive SQL Program (Start->Programs->Hornbill Core Services ->Interactive SQL.)
7...Enter the following replacing DATABASE and TABLENAME with the appropriate values. 
 
Use DATABASE;   
Repair Table TABLENAME;

8...Take a copy of the Results Returned. The table should now have been repaired.

9...On the Server TAB start all remaining services.


Once done the Table will be repaired, should you require any further information and/or assistance please feel free to contact Hornbill Support using the webform https://support-works.com/support/