Author Topic: Database problems  (Read 2171 times)

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Database problems
« on: September 05, 2014, 09:42:29 am »
Hi,

 Server Platform:
   Netxms 1.2.16
   Database: MySQL
   OS: Windows Server 2008 R2

 I've had some data problems since upgrading to 1.2.16 and I've had to delete some nodes and rebuild them to get around broken data. In the server system logs I'm getting lots of errors from NetXMS Core such as these:

SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (?,?,?)"): Table '.\netxms\idata_12' is marked as crashed and should be repaired

I've no idea where to start on this, any help would be appreciated.

Regards,
David

edward.borst

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Database problems
« Reply #1 on: September 05, 2014, 10:30:21 pm »
looks like you have had some disk problem.
maybe no diskspace or so.

you can try to repair this table (and probably other tables as well) by running:

Code: [Select]
mysqlcheck --auto-repair <database name> -u root -p
give the password for mysql root user.
This will check all the tables in de database and try to fix them.



DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Database problems
« Reply #2 on: September 08, 2014, 06:29:35 pm »
Hi,

 Thanks for that, there is plenty of disk space but the server did get dumped when the battery in the UPS failed and there was a power outage.
 I've run the MySQL repair and will see how it goes, NetXMS core started without errors which is a good sign.

Regards,
David