database disk image is malformed

Posted on
Mon Feb 25, 2019 2:33 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

database disk image is malformed

I lost power today :cry: and when it came back on, I started getting these messages in the log:
SQL Logger Error INSERT INTO variable_history_942138985 (value) VALUES (%s);
SQL Logger Error exception trying to insert row into table variable_history_120520254 ("CPU_usage_TP-Link-Device")
SQL Logger Error database disk image is malformed

I tried to fix it using the utility plugin:
utilities starting SQLite job /usr/bin/python2.7 '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/utilities.indigoPlugin/Contents/Server Plugin/mkbackup.py' fix variable_history_1824208005
utilities ... started at 2019-02-25 14:41:50.590383
utilities FIX SQL job submitted, check ~/indigo/Utilities/backup.log/ for detailed info, this might take a long time (~ 1 hour for 8GByte on Mac-Mini 2014)
utilities FIX of SQLite failed, check logfile: /Users/jburgess/indigo/utilities/backup.log .. /Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history-fixed.sqlite file not created

and when I look in that log, the only non-0 error I see is (just a few lines, not the whole log):
stepTest started :2019-01-13 13:35:02.896604
stepTest cmd: /usr/bin/sqlite3 '/Library/Application Support/Perceptive Automation/Indigo 7/logs/c-fixed.sqlite' "Select * from variable_history_1824208005;"
stepTest seconds used :0; error= Error: no such table: variable_history_1824208005
finished indigo sqlite job :2019-01-13 13:35:02.906757
total seconds used :0


I'm a novice at sqlite. Any help appreciated. Can I / Should I just delete the database?
/Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/indigo_history.sqlite

Posted on
Mon Feb 25, 2019 3:34 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: database disk image is malformed

Yes delete or if you have a backup use that one

The indigo utilities has a backup feature for SQLite
It does a dB dump then a backup

If you just do a backup of a large file that is constantly changing it will likely not work when you want to reinstall

And if you start from scratch anyway go to Postgres app

It is very easy to install
Download and click on install
Then config to start at startup
Then in indigo select Postgres for logger

It is much more stable than SQLite and likely survives power offs.

Karl.



Sent from my iPhone using Tapatalk

Posted on
Mon Feb 25, 2019 4:14 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: database disk image is malformed

IT took me quite a few goes to get the utility plugin to restore my corrupted database, I may have used a time machine version (although as Karl says, no guarantee that works either) and I may just have had luck with the actual db file.

If you can get it working, or have to start from scratch, definitely setup the Postgres app. You wont have this pain again...

Posted on
Mon Feb 25, 2019 4:36 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: database disk image is malformed

Thanks, guys.
I've downloaded and installed PostgreSQL, and have reconfigured the plugin to use it instead
Now to give pgAdmin a spin...

Posted on
Mon Jun 17, 2019 9:27 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: database disk image is malformed

I rebooted my Mac mini today ...... and now suffer from the SQL Logger Database Malformed issue.....

Talk about vomit in the Event Log....

I have disabled the SQL Logger installed Postgres

The only place I got stuck was ..

kw123 wrote:
Y
Then in indigo select Postgres for logger


For the life of me it took a long time to find that setting - obvious now, but a the time I saw SQL Logger and SQLite as synonymous.... doh!

Once I figured how to get Indigo to select Postgres it got a lot easier....

Thanks for the help on this, appreciated.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest

cron