Hi,

Yes, this looks like a corrupt database. To recover the data, use the tool
org.h2.tools.Recover to create the SQL script file, and then re-create the
database using this script. Does it work when you do this?

Possible reasons:

Using LOG=0 and other dangerous features (see the FAQ).

With version 1.3.171 and older: when using local temporary tables and not
dropping them manually before closing the session, and then killing the
process could result in a database that couldn't be opened.

With version 1.3.162 and older: on out of disk space, the database can get
corrupt sometimes, if later write operations succeed. The same problem
happens on other kinds of I/O exceptions (where one or some of the writes
fail, but subsequent writes succeed). Now the file is closed on the first
unsuccessful write operation, so that later requests fail consistently.

Regards,
Thomas

On Friday, December 6, 2013, Steven Stroud wrote:

> Subsequent connections (sometimes from the same thread, sometimes from
> other threads) to the database seem to be retrieving other tables
> successfully. Is this possible from a corrupt database?
>
> On Tuesday, December 3, 2013 11:39:27 AM UTC-6, Thomas Mueller wrote:
>>
>> Hi,
>>
>> It looks like a corrupt database. According to the error code, [50000-169],
>> you are using H2 build number 169, that is version 1.3.169. I would
>> probably upgrade to a more recent version of H2, as quite a few bugs have
>> been fixed since them, some of them related to corruption. To recover the
>> data, you could try using the Recover tool.
>>
>> Regards,
>> Thomas
>>
>>
>>
>> On Wednesday, November 27, 2013, Steven Stroud wrote:
>>
>>> I'm seeing the following error
>>>
>>>
>>> 2013-11-27 04:14:24,432 ERROR 
>>> [coop.nisc.mwf.clientdb.h2.differential.H2DifferentialDatabaseGenerator]
>>>     [http-0.0.0.0-35000-34] Wed Nov 27 04:14:24 CST 2013    
>>> java.lang.RuntimeException: org.h2.jdbc.JdbcSQLException: General error: 
>>> "java.lang.RuntimeException: page[92402] data leaf table:197 AGREEMENTS 
>>> entries:4 parent:92403 keys:[202105, 202106, 202107, 202108] offsets:[1821, 
>>> 1604, 1377, 1157] parent 92403 expected 75251"; SQL statement:
>>> Select * from AGREEMENTS order by BI_CUST_NBR, BI_ACCT, BI_TYPE_SRV, 
>>> BI_SRV_LOC_NBR [50000-169]
>>>
>>>
>>> The ultimate cause seems to be:
>>>
>>>
>>> Caused by: java.lang.RuntimeException: page[92402] data leaf table:197 
>>> AGREEMENTS entries:4 parent:92403 keys:[202105, 202106, 202107, 202108] 
>>> offsets:[1821, 1604, 1377, 1157] parent 92403 expected 75251
>>>     at org.h2.message.DbException.throwInternalError(DbException.java:228)
>>>     at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:239)
>>>     at org.h2.index.PageDataNode.getNextPage(PageDataNode.java:226)
>>>     at org.h2.index.PageDataNode.getNextPage(PageDataNode.java:224)
>>>     at org.h2.index.PageDataLeaf.getNextPage(PageDataLeaf.java:392)
>>>     at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:90)
>>>     at org.h2.index.PageDataCursor.next(PageDataCursor.java:49)
>>>     at org.h2.index.IndexCursor.next(IndexCursor.java:238)
>>>     at org.h2.table.TableFilter.next(TableFilter.java:353)
>>>     at org.h2.command.dml.Select.queryFlat(Select.java:513)
>>>     at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)
>>>     at org.h2.command.dml.Query.query(Query.java:307)
>>>     at org.h2.command.dml.Query.query(Query.java:277)
>>>     at org.h2.command.dml.Query.query(Query.java:36)
>>>     at org.h2.command.CommandContainer.query(CommandContainer.java:86)
>>>     at org.h2.command.Command.executeQuery(Command.java:191)
>>>
>>>
>>> Any thoughts about what might be happening?
>>>
>>>  --
>>> 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 http://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>  --
> 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] <javascript:_e({},
> 'cvml', 'h2-database%[email protected]');>.
> To post to this group, send email to 
> [email protected]<javascript:_e({}, 'cvml', 
> '[email protected]');>
> .
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to