Hi,

> I have database in a corrupted state (created in 1.116, now under
> 1.119).

Databases should never get corrupt. I think that's the main point.
Unfortunately, there still was quite a high risk in the past (versions
1.0 and 1.1). This was one of the reasons why I wrote a new file
format (the page store format) that is used in versions 1.2. (there
were other reasons such as ability to support really big databases and
use less memory). I think the risk of database corruption is now
lower.

I'm not sure if it makes sense to try to find out why your database
(version 1.1.116-1.1.119) got corrupt. If you want to find out, could
you answer the questions below?

> Problem can be solved by manual removal of duplicated record from the
> SQL script. I wonder how such problem can be handled in automatic mode
> with H2 tools?

I think that would be dangerous, because the database couldn't know
which one of the row is the correct one. I would rather spend time to
reduce the risk of data corruption than try to better automate
recovery after a crash.

Regards,
Thomas

---

Questions:

- Could you send the full stack trace of the exception including message text?
- What is your database URL?
- Do you use Tomcat or another web server?
    Do you unload or reload the web application?
- Did you use multiple connections?
- With which version of H2 was this database created?
    You can find it out using:
    select * from information_schema.settings where name='CREATE_BUILD'
- Did the application run out of memory (once, or multiple times)?
- Do you use any settings or special features (for example, the setting
    LOG=0, or two phase commit, linked tables, cache settings)?
- Is the application multi-threaded?
- What operating system, file system, and virtual machine
    (java -version) do you use?
- Is it (or was it at some point) a networked file system?
- How big is the database (file sizes)?
- 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?

-- 
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.

Reply via email to