"The database disk image is malformed"

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MichaelBluejay
Posts: 222
Joined: Thu Jul 01, 2010 11:50 am

"The database disk image is malformed"

Post by MichaelBluejay » Sun Feb 14, 2021 3:35 am

When running this query in my stack:

Code: Select all

SELECT id,noteName,noteData from noteTable WHERE noteData LIKE "%hibiscus%"
I get the error: revdberr,Database Error: The database disk image is malformed

If I open the db in the MacOS app "DB Browser for SQLite", the query runs just fine.

Also, my queries *used* to run just fine in my stack. Suddenly today I'm getting the error. I can't think of anything that changed.

Typing "sqlite3" into Terminal, I get "SQLite version 3.34.0 2020-12-01 16:14:00".

Running MacOS 10.13.6, LC Community Edition 9.6.2-rc2.

MichaelBluejay
Posts: 222
Joined: Thu Jul 01, 2010 11:50 am

Re: "The database disk image is malformed"

Post by MichaelBluejay » Sun Feb 14, 2021 4:13 am

It apparently was a corrupt database. I found the new "recover" command, which fixed the problem. Running from the MacOS Terminal:

Code: Select all

sqlite3 corruptedFile.sql .recover | sqlite3 recoveredFile.sql
Now I know how much hibiscus to use to make my tea.

Post Reply

Return to “Databases”