Hi all. Version 1.4.200 We had an issue with our database where the database got corrupted. If you try to open it, you get the error 90030. The database is around 500MB.
We copied the database with the issue into a folder and then run java -cp /some/location/h2-1.4.200.jar org.h2.tools.Recover This creates two files dbname.h2.sql dbname.mv.txt The SQL file is 32Kb, and the TXT file is 50MB Then I run the below command to create a new DB based on the recover tool java -cp /some/location/h2-1.4.200.jar org.h2.tools.RunScript -url jdbc:h2./newdbname -user user -password password -script dbname.h2.sql -showResults -continueOnError -checkResults I do get a new DB created without errors, but it is only 16Kb in size. When you connect to it, it does not have the schema that was based on my original corrupted DB. It seems like an shell DB.. As the Recover tool gives a txt file as well, I did use this but you get errors A small sample of the sql and txt file are shown below. The SQL file seems to have meta data to chunks?? Is there something wrong with the way I am trying to recover this DB. Also as it spits out two files, do the two files need to be merge in anyway. What is the purpose of the two files. SQL file: -- MVStore CREATE ALIAS IF NOT EXISTS READ_BLOB FOR "org.h2.tools.Recover.readBlob"; CREATE ALIAS IF NOT EXISTS READ_CLOB FOR "org.h2.tools.Recover.readClob"; CREATE ALIAS IF NOT EXISTS READ_BLOB_DB FOR "org.h2.tools.Recover.readBlobDb"; CREATE ALIAS IF NOT EXISTS READ_CLOB_DB FOR "org.h2.tools.Recover.readClobDb"; CREATE ALIAS IF NOT EXISTS READ_BLOB_MAP FOR "org.h2.tools.Recover.readBlobMap"; CREATE ALIAS IF NOT EXISTS READ_CLOB_MAP FOR "org.h2.tools.Recover.readClobMap"; -- Meta -- chunk.1ebb3c = chunk:1ebb3c,block:74fb,len:38f,liveMax:417c80,livePages:261,map:210,max:4229e0,pages:2bd,root:7aecf000e2ba90d,time:e2827c48,unusedAtVersion:1edc49,version:1ebb3c,pinCount:0 -- chunk.1ebb3d = chunk:1ebb3d,block:2f97,len:334,liveMax:303600,livePages:20c,map:210,max:3ce220,pages:2d6,root:7aecf400cc1628d,time:e2827dd5,unusedAtVersion:1ee7ed,version:1ebb3d,pinCount:0 -- chunk.1ebb98 = chunk:1ebb98,block:bf7d,len:38e,liveMax:f3000,livePages:89,map:210,max:434a30,pages:295,root:7aee6000e25894b,time:e283e74b,unusedAtVersion:1ee7ed,version:1ebb98,pinCount:0 -- chunk.1ebb9b = chunk:1ebb9b,block:9715,len:21c,liveMax:292880,livePages:15d,map:210,max:29ada0,pages:197,root:7aee6c00861a74b,time:e283e844,unusedAtVersion:1ebc7a,version:1ebb9b,pinCount:0 .. .. -- Tables ---- Schema SET ---- ---- Table Data ---- ---- Schema ---- DROP ALIAS READ_BLOB; DROP ALIAS READ_CLOB; DROP ALIAS READ_BLOB_DB; DROP ALIAS READ_CLOB_DB; DROP ALIAS READ_BLOB_MAP; DROP ALIAS READ_CLOB_MAP; DROP TABLE IF EXISTS INFORMATION_SCHEMA.LOB_BLOCKS; Text File File /home2/username/somedir/dbname.mv.db, 539852800 bytes, 514 MB 00000000 fileHeader H:2,block:33f2,blockSize:1000,chunk:1f03ed,created:18591915411,format:1,version:1f03ed,fletcher:9fe6a76f 00001000 fileHeader H:2,block:33f2,blockSize:1000,chunk:1f03ed,created:18591915411,format:1,version:1f03ed,fletcher:9fe6a76f 00002000 chunkHeader chunk:1f030e,block:2,len:8,map:210,max:8e00,next:c,pages:33,root:7c0c380000e354b,time:e3ac526b,version:1f030e,pinCount:0 +000000c5 node, map 4, 5 entries, 81 bytes, maxLen 60 265 children @ chunk 1f02a0 +00002313 1614 children @ chunk 1f02a0 +0000407b 2182 children @ chunk 1f02a0 +0000e6c8 72729 children @ chunk 1f0309 +00000116 202682 children @ chunk 1f030e +00000116 +00000116 node, map 4, 29 entries, 439 bytes, maxLen 200 6694 children @ chunk 1f02ee +00000ac6 7001 children @ chunk 1f02ee +00001ab2 6811 children @ chunk 1f02ee +00003938 6947 children @ chunk 1f02ee +00020e73 -- 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 h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/85e71c9a-f654-4419-affd-4dc0f063d71fn%40googlegroups.com.