Hi,
Possibly the database was corrupt before, but this was not detected.
What version of H2 was used before? Did you migrate the database using
SCRIPT TO / RUNSCRIPT FROM or did you just use a new version of the
h2*.jar file?
What is the complete error message, including error codes and all stack traces?
> - What's the best (programmatic, non-interactive) way to recover from
> this error?
It is using the Recover tool.
> - What can be the best and what the worst result one can hope for when
> attempting recovery?
The best result is that no data is lost (if only an index is corrupt).
The worst result is that some of the data is lost.
I am very interested in analyzing and solving this problem. Corruption
problems have top priority for me. I have a few questions:
- How many connections does your application use concurrently?
- Do you use temporary tables?
- Did you use LOG=0 or LOG=1?
- With which version of H2 was this database created?
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
or have a look in the SQL script created by the recover tool.
- Did the application run out of memory (once, or multiple times)?
- Do you use any settings or special features (for example cache settings,
two phase commit, linked tables)?
- Do you use any H2-specific system properties?
- Is the application multi-threaded?
- What operating system, file system, and virtual machine
(java -version) do you use?
- How did you start the Java process (java -Xmx... and so on)?
- Is it (or was it at some point) a networked file system?
- How big is the database (file sizes)?
- How much heap memory does the Java process have?
- Is the database usually closed normally, or is process terminated
forcefully or the computer switched off?
- Is it possible to reproduce this problem using a fresh database
(sometimes, or always)?
- Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please?
- Do you still have any .trace.db files, and if yes could you send them?
- Could you send the .h2.db file where this exception occurs?
Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.