"Database Disc Image is Malformed"

Hi there,

I've been having trouble getting my Zotero to start. I've tried reinstalling and have also tried the database .sqlite fix (upload id reference: 5b2636ef5b8f8)

When I try to restart Zotero after the reinstall and .sqlite fix I keep getting the following error:

"Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: SELECT COALESCE(MAX(valueID) + 1, 1) FROM itemDataValues] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.valueQueryAsync<@chrome://zotero/content/xpcom/db.js:760:10
From previous event:
ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:339:4
@chrome://zotero/content/include.js:4:14"

Quite keen to fix this ASAP as I had setup a really good biblio for my PhD and it's not accessible with Zotero at the moment! Any ideas anyone?

EK
  • The file you uploaded isn't damaged. Did you upload zotero.sqlite or zotero.sqlite.bak? If the latter, you can try closing Zotero and renaming the former to zotero.sqlite.old and copying zotero.sqlite.bak to zotero.sqlite.

    If the latter, this might be some security software on your computer interfering with Zotero's ability to access the database, though this would be an unusual error message in that case. Do you have your Zotero data directory in the standard location, or is it in some sort of cloud storage or network share?
  • I just double checked, I definitely uploaded the zotero.sqlite file and not the .bak one. I have Zotero in a file that syncs with Google drive, but is "available offline" - I also just tried moving my database to the standard file location and doesn't interact with google drive sync and it's still not very happy... It just throws up the same error :/
  • What you are seeing is that your database has been corrupted by storing it in Google Drive. You absolutely cannot store your Zotero database in Google Drive or any other cloud folder—that will inevitably lead to corruption like this.

    Put your Zotero folder back in the default location (~/Zotero on Mac/Linux or C:/users//Zotero on Windows). In Zotero, in the Advanced pane, reset the data directory location to the default location. Try to restart Zotero. If that doesn’t work, rename the .bak file to just zotero.sqlite and try again.
  • Ok - I've tried that. Everything is now back in the default location
    C:\Users\EKM\Zotero

    And I still got the error message, so I've reuploaded the sqlite file to the dbfix page (upload id: 5b2cfe1cbdac2)

    It's now gotten rid of the error message, and the collection folders are showing on the left, but when I open the collection folders there is nothing in there! I've checked that they are all still there in the "storage" folder inside the Zotero directory, but they seem to have lost their associations with the collections. Any ideas how to fix this part? I've got quite a few and not sure I'll be able to go through manually to re-assign them to the right collections!
  • You'll need to restore from a backup. Your database is corrupted beyond repair by being stored in Google Drive.
  • edited June 22, 2018
    You have an online library that you've synced to recently. Does that have all your data? If so, you can simply delete zotero.sqlite, restart Zotero, and let it sync down your online library data. (It looks like you were at your file sync quota, so files wouldn't all have uploaded, but those should still be present locally if you created them on this computer).
  • Thank you all for the help. I'm still getting the error message and I also realise that I do need something that can interface nicely with my Google Drive docs, so I'm going to try Paperpile! Zotero was working very well for me until this little blip and for some reason I can't seem to get around the corrupted database. Thanks again for being so responsive and trying to help!
  • edited June 23, 2018
    It’s possible to use Zotero with Google Drive and Google Docs, just not to store the database itself there. We can help you set that up if you want.
  • How is it possible to use Zotero with Google Drive and not store the database there, please?
  • You must set up Zotero so that everything except your PDFs, etc is on your own computer's hard drive and so that your Zotero database is synced to your Zotero account.

    Please read the following documentation items and, if necessary, ask specific questions.

    https://www.zotero.org/support/kb/using_multiple_computers

    https://www.zotero.org/support/preferences/advanced (scroll to Data Directory Location)

    https://www.zotero.org/support/attaching_files

    https://www.zotero.org/support/sync
  • More succinctly, you have 3 options:
    1.) Use linked files, automatically moved via ZotFile, as described in option 1 here: https://www.zotero.org/support/sync#alternative_syncing_solutions

    2.) Set up a webDAV bridge to google drive. Possible, but a bit finnicky

    3.) The new Google "Backup and Sync" tool allows you to sync specific folders on your harddisk. If you set it up to sync _just_ the storage folder in the Zotero, making sure to not sync any of the data folders other content, that should work, too. Since the service is new, we don't have any reports on how well that'll work yet.
Sign In or Register to comment.