Database update error...
Just updated to the latest version. On start-up I get the following message:
Database upgrade error
Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: SELECT COUNT(*) > 0 FROM fulltextItemWords WHERE itemID NOT IN (SELECT itemID FROM items WHERE itemTypeID=2)] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.valueQueryAsync@chrome://zotero/content/xpcom/db.js:762:13
From previous event:
this.init@chrome://zotero/content/xpcom/zotero.js:414:25
getContentsFromURL@chrome://zotero/content/xpcom/file.js:339:13
Zotero.Intl</<@chrome://zotero/content/xpcom/intl.js:100:35
Zotero.Intl</this.getString@chrome://zotero/content/xpcom/intl.js:144:18
this.getString@chrome://zotero/content/xpcom/zotero.js:1523:24
ZoteroPane<@chrome://zotero/content/zoteroPane.js:3176:19
@chrome://zotero/content/zoteroPane.js:31:18
@chrome://zotero/content/zoteroPane.xhtml:82:25
Did Zotero just nuke my database?
Database upgrade error
Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: SELECT COUNT(*) > 0 FROM fulltextItemWords WHERE itemID NOT IN (SELECT itemID FROM items WHERE itemTypeID=2)] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.valueQueryAsync@chrome://zotero/content/xpcom/db.js:762:13
From previous event:
this.init@chrome://zotero/content/xpcom/zotero.js:414:25
getContentsFromURL@chrome://zotero/content/xpcom/file.js:339:13
Zotero.Intl</<@chrome://zotero/content/xpcom/intl.js:100:35
Zotero.Intl</this.getString@chrome://zotero/content/xpcom/intl.js:144:18
this.getString@chrome://zotero/content/xpcom/zotero.js:1523:24
ZoteroPane<@chrome://zotero/content/zoteroPane.js:3176:19
@chrome://zotero/content/zoteroPane.js:31:18
@chrome://zotero/content/zoteroPane.xhtml:82:25
Did Zotero just nuke my database?
I've had no issues with it there, or working from a USB stick in the past.
Might have to try installing Zotero 6 again to see if that fixes the issue...I really don't look forward to re-cataloguing 35 GB worth of files.
this makes me think there's a significant issue with the way Zotero 7 deals with the SQLite database.
If you can start up Zotero (any version), you can check the database integrity from the Advanced → Files and Folders section of the Zotero settings. Otherwise, if your DB compresses to <150 MB, you can try the DB Repair Tool. If not, you'd have to use something like DB Browser for SQLite and run
PRAGMA integrity_check;
manually.Going back to Zotero 6 solved the problem.
We used the tool to check the DB integrity in Zotero, which told us that the database was indeed slightly corrupted.
Since our database was 164 MB, we installed DB Browser for SQLite, opened the sqlite file, and then ran the PRAGMA integrity_check command.
Here is the response:
https://s3.amazonaws.com/zotero.org/images/forums/u3230111/0anmeixofa4opba19tll.png
Do you know what we can do with that?
Thanks you in advance
1) Follow the manual repair instructions to run
.recover
from the SQLite command-line interface. We can't guide people through that on Windows, though.2) If you've been using Zotero syncing and all your data is online, you can just close Zotero and delete zotero.sqlite in your Zotero data directory, and then let Zotero sync down your data from the online library.