Hi, 

We are facing a lot of database corruption issues when application is 
abruptly closed due to power failure or terminated by user from task 
manager.

We tried with recover tool but it also fails with below error

D:\Alas>java -cp h2-1.4.195.jar org.h2.tools.Recover
Exception in thread "main" java.lang.IllegalStateException: File corrupted 
in chunk 1051891, expected page length 4..1024, got 808464432 [1.4.195/6]
        at 
org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
        at org.h2.mvstore.Page.read(Page.java:649)
        at org.h2.mvstore.Page.read(Page.java:195)
        at org.h2.mvstore.MVStore.readPage(MVStore.java:1952)
        at org.h2.mvstore.MVMap.readPage(MVMap.java:741)
        at org.h2.mvstore.Page.getChildPage(Page.java:217)
        at org.h2.mvstore.MVMap.binarySearch(MVMap.java:473)
        at org.h2.mvstore.MVMap.binarySearch(MVMap.java:474)
        at org.h2.mvstore.MVMap.get(MVMap.java:455)
        at org.h2.mvstore.MVStore.getChunkIfFound(MVStore.java:958)
        at org.h2.mvstore.MVStore.getChunk(MVStore.java:935)
        at org.h2.mvstore.MVStore.readPage(MVStore.java:1943)
        at org.h2.mvstore.MVMap.readPage(MVMap.java:741)
        at org.h2.mvstore.Page.getChildPage(Page.java:217)
        at org.h2.mvstore.Cursor.min(Cursor.java:129)
        at org.h2.mvstore.Cursor.hasNext(Cursor.java:36)
        at org.h2.mvstore.MVStore.loadChunkMeta(MVStore.java:694)
        at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:675)
        at org.h2.mvstore.MVStore.<init>(MVStore.java:358)
        at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930)
        at org.h2.mvstore.MVStoreTool.info(MVStoreTool.java:346)
        at org.h2.tools.Recover.process(Recover.java:346)
        at org.h2.tools.Recover.runTool(Recover.java:196)
        at org.h2.tools.Recover.main(Recover.java:159)

What is the mechanism to avoid this corruption and how to recover?

Regards
Asheesh

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to