DDMDB Event table insert error

Document ID : KB000092209
Last Modified Date : 27/05/2018
Show Technical Document Details
Issue:
The Archive manager database insert error generated.
At the same time, the following message recorded in the ARCHMGR.OUT.
-------------------------------------------------------------
3 29 01:49:09 ERROR TRACE at ModelArchDBImp.cc(4814): doSqlQuery/mysql_query: Failure executing query:
INSERT DELAYED IGNORE INTO event(model_h, utime, counter, clk_seq, version, node_id, user_key, type, severity, vardata_string) VALUES(5247247,1522255748,934267,411,1,'\0PV N ,67329,20,' \0\0\0\0 \0\0 \0\0\0zA
\0 \0\0\0 \0\0\0 \0\0\0 \0\0\0 \0\0\0 \0 \0\0\0 \0\0\0 \0\0\0 \0\0\0\0\0\0\0 \0\0\0 \0\0\0 \0\0\0 ?ZzA
\0 \0PV N \0\0 \0\0\0 \0\0\0 \0\0\0 ?ZyA
\0 \0PV N \0\0 \0\0\0 \r\0\0\0 \0\0\0\0\0\0\0')
- Query execution was interrupted ModelArchDb ERROR at DDMDbIf2.cc(885):
-------------------------------------------------------------
Cause:
The DDMDB Event table returned crashed status.
C:\>bash -login 
> cd mysql/bin 
> ./mysql -uroot -proot ddmdb  
mysql> show table status; 
| event | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
| NULL | NULL | NULL | NULL | NULL| NULL | NULL | Table '.\ddmdb\event' | is marked as crashed and should be repaired |
Resolution:
The problem resolved by following procedure:
C:\>bash -login
> cd SS/DDM
> ./ArchMgr -repair
4 03 17:10:57 : ArchMgr started as user 'Administrator'
4 03 17:10:57 : ArchMgr attempting to repair corrupt database
SPC-SHD-29021:
**************************************************************************
4 03 17:10:58 ERROR TRACE at ModelArchDBImp.cc(4814): doSqlQuery/mysql_query: Failure executing query:
SHOW COLUMNS FROM event LIKE 'node_id' - Table '.\ddmdb\event' is marked as crashed and should be repaired

Database corruption detected:
  ddmdb.event - Size of indexfile is: 54490112  Should be: 95400960
  ddmdb.event - Size of datafile is: 288640840  Should be: 357222664
  ddmdb.event - Corrupt
Repairing...
  ddmdb.event - OK
4 03 17:11:08 : ArchMgr successfully repaired database.