#61 ✓resolved
Hans Kalldin

corrupt piggydb database

Reported by Hans Kalldin | February 5th, 2014 @ 07:22 PM

Hi,
I'm a happy user of piggydb for a couple of years now. It's been very reliable, until now. Don't know what has happened but every time I try to register a modified fragment, I get this error:

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [update fragment set update_datetime = ?, updater = ?, title = ?, content = ?, file_name = ?, file_type = ?, file_size = ?, password = ?, tag_id = ? where fragment_id = ? and update_datetime = ?]; SQL state [90030]; error code [90030]; File corrupted while reading record: "page[3397] data leaf table:60 entries:1 parent:2287 keys:[654] offsets:[1065]". Possible solution: use the recovery tool; SQL statement: DELETE FROM FT.MAP WHERE ROWID=? AND WORDID=? [90030-145]; nested exception is org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "page[3397] data leaf table:60 entries:1 parent:2287 keys:[654] offsets:[1065]". Possible solution: use the recovery tool; SQL statement: DELETE FROM FT.MAP WHERE ROWID=? AND WORDID=? [90030-145]

please tell me there is a way to resurrect the database. (was a while since last backup, arghh)

this is running on Win-7. Seems read access still works OK.

thanks
/Hans

Comments and changes to this ticket

  • marubinotto

    marubinotto February 6th, 2014 @ 02:16 AM

    Hi Hans,

    This kind of database corruption is typically caused by unexpected shutdown (ex. power failure).

    Does the export feature work? If so, try out the following steps:

    1) export your data
    2) stop Piggydb server
    3) rename your database folder (database location: http://piggydb.jp/en/d/16)
    4) restart Piggydb server (the database should be empty)
    5) restore database with the exported file

  • Hans Kalldin

    Hans Kalldin February 6th, 2014 @ 08:29 AM

    Thanks for your very quick response but unfortunately this did not work.
    I get this error when trying to restore the database from the .pig file:

    The data file is invalid

    (I could not paste my screenshot here)

  • Hans Kalldin

    Hans Kalldin February 6th, 2014 @ 09:54 PM

    Hi again,
    after some analysis I saw it was not that many changes I had lost since last backup so I went ahead and rolled the database back and re-entered the changes. so I'm good, no need for further assistance.

    on another note, there is one feature that would be really useful - a more advanced text-search, ideally understanding regular expressions. But something less advanced, allowing me to quote an exact search string (that for instance may contain white-space or '-'), '?'to denote any single character and '*' to denote any sequence of characters would go a long way. (akin to UNIX/Linux wildcards)

    Thanks for a great tool!

  • marubinotto

    marubinotto February 8th, 2014 @ 05:44 AM

    • State changed from “new” to “resolved”

    Great. I was thinking about recovering your database file if you were ok with sending me the files.

    Thank you for your suggestion about advanced text-search. Searching by regular expressions would be too slow if the size of the database is large. But I will consider extending the search feature anyway. Thanks!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Piggydb is a Web notebook application that provides you with a platform to build your knowledge personally or collaboratively.

Shared Ticket Bins

People watching this ticket

Pages