Are you using MySQL database, if yes then visit below link for manual repair
For repair: MySQL :: MySQL 5.1 Reference Manual :: 12.4.2.6 REPAIR TABLE Syntax
For Optimize: MySQL :: MySQL 5.1...