Sysload Management Server: Database corruption

Document ID : KB000087176
Last Modified Date : 18/05/2018
Show Technical Document Details
Issue:
Affects Release version(s): 5

Error Message :
Wed Aug 03 13:50:16 2016: LPtrVerif - OBaseOfObjects.c[1407] - Invalid Pointer Error
Patch level detected:Sysload Management Server 5.50
Product Version: Sysload 5.5.0

Description :Database's corruption sometimes occurs during Management Server upgrade (5.50 to 6.10).
Management Server could not start. The following message appears in the logs: database disk image is malformed
Environment:
OS: Windows
Related configuration item(s): sld_objects_repository database
Cause:
Unknown cause
Resolution:
Database must be rebuilt to fix the corruption.
You need to download SQLite for Windows (https://www.sqlite.org/download.html) or transfer the database file to a Linux server.

1 - Check Database Integrity with Pragma command :

$ sqlite3 sld_objects_repository
sqlite> pragma integrity_check;

sqlite> .quit

SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma integrity_check;
rowid 1330553 missing from index sld_property_FKIndex1
rowid 1339729 missing from index sld_property_FKIndex1
rowid 1391484 missing from index sld_property_FKIndex1
rowid 2111800 missing from index sld_property_FKIndex1
rowid 2111810 missing from index sld_property_FKIndex1
rowid 2111810 missing from index sld_property_Index_PropName
wrong # of entries in index sld_property_FKIndex1
wrong # of entries in index sld_property_Index_PropName
wrong # of entries in index sld_object_FKIndex1
wrong # of entries in index sld_object_Index_key
sqlite>

2 - Rebuild database
$ echo .dump | sqlite3 sld_objects_repository > sld_objects_repository_repaired.sql
$ sqlite3 -init sld_objects_repository_repaired.sql sld_objects_repository_repaired

3 - Rename "sld_objects_repository_repaired" to "sld_objects_repository"

4 - Replace the corrupted database by the new "sld_objects_repository"