Hi,
The recovery tool doesn't connect to the database, it opens the database
files directly. The tool is started with
java org.h2.tools.Recover
See also the documentation and the Javadocs.
Regards,
Thomas
On Monday, March 25, 2013, Andrei Dan wrote:
> Hello,
>
> No, using the recovery tool didn't work since it was not able to connect
> to the db.
>
> I'll try to update to the latest version.
>
> Thanks,
>
> Andrei.
>
> On Sunday, March 17, 2013 8:40:26 PM UTC+2, Thomas Mueller wrote:
>>
>> Hi,
>>
>> 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?
>>
>> 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.
>>
>> Important corruption problems were fixed in version 1.2.135 and version
>> 1.2.140 (see the change log). Known causes for corrupt databases are: if
>> the database was created or used with a version older than 1.2.135, and the
>> process was killed while the database was closing or writing a checkpoint.
>> Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while
>> at the same time using multiple connections. Disabling database file
>> protection using (setting FILE_LOCK to NO in the database URL). Some other
>> areas that are not fully tested are: Platforms other than Windows XP,
>> Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6; the feature
>> MULTI_THREADED; the features AUTO_SERVER and AUTO_RECONNECT; the file
>> locking method 'Serialized'.
>>
>> So I suggest to upgrade to a more recent version of H2.
>>
>> Regards,
>> Thomas
>>
>>
>>
>> On Fri, Feb 22, 2013 at 2:12 PM, Andrei Dan <[email protected]> wrote:
>> >
>> > Hello,
>> >
>> > I am using H2 1.3.150 and I'm trying to connect to it whenever I start
>> my application ( running on java 1.6.0_37 ), but after a restart of my
>> application I wasn't able to connect to it anymore ( neither from my app
>> and neither form the H2 Console ).
>> >
>> > The exception I get is :
>> >
>> > Caused by: org.h2.jdbc.JdbcSQLException: General error:
>> "java.lang.RuntimeException: rowcount remaining=1 SYS" [50000-150]
>> >
>> > at org.h2.message.DbException.**getJdbcSQLException(**
>> DbException.java:327)
>> >
>> > at org.h2.message.DbException.**
>> get(DbException.java:156)
>> >
>> > at org.h2.message.DbException.**
>> convert(DbException.java:279)
>> >
>> > at org.h2.engine.Database.**openDatabase(Database.java:*
>> *248)
>> >
>> > at org.h2.engine.Database.<init>(**Database.java:213)
>> >
>> > at org.h2.engine.Engine.**openSession(Engine.java:56)
>> >
>> > at org.h2.engine.Engine.**openSession(Engine.java:159)
>> >
>> > at org.h2.engine.Engine.**createSessionAndValidate(**
>> Engine.java:138)
>> >
>> > at org.h2.engine.Engine.**createSession(Engine.java:121)
>> >
>> > at org.h2.engine.Engine.**createSession(Engine.java:28)
>> >
>> > at org.h2.engine.SessionRemote.**
>> connectEmbeddedOrServer(**SessionRemote.java:289)
>> >
>> > at org.h2.engine.SessionRemote.**
>> createSession(SessionRemote.**java:265)
>> >
>> > at org.h2.jdbc.JdbcConnection.<**
>> init>(JdbcConnection.java:110)
>> >
>> > at org.h2.jdbc.JdbcConnection.<**
>> init>(JdbcConnection.java:94)
>> >
>> > at org.h2.Driver.connect(Driver.**java:62)
>> >
>> > at java.sql.DriverManager.**getConnection(Unknown
>> Source)
>> >
>> > at java.sql.DriverManager.**getConnection(Unknown
>> Source)
>> >
>> > at org.h2.tools.RunScript.**process(RunScript.java:305)
>> >
>> > at org.h2.tools.RunScript.**execute(RunScript.java:289)
>> >
>> > ... 72 more
>> >
>> > Caused by: java.lang.RuntimeException: rowcount remaining=1 SYS
>> >
>> > at org.h2.message.DbException.**throwInternalError(**
>> DbException.java:226)
>> >
>> > at org.h2.table.RegularTable.**
>> addIndex(RegularTable.java:**260)
>> >
>> > at org.h2.engine.Database.open(**Database.java:585)
>> >
>> > at org.h2.engine.Database.**openDatabase(Database.java:*
>> *218)
>> >
>> > ... 88 more
>> >
>> >
>> > Also, here's the exception from my h2 trace file ( which looks a bit
>> different ):
>> >
>> > org.h2.jdbc.JdbcSQLException: General error:
>> "java.lang.RuntimeException: rowCount expected 28 got 31
>> LOB_MAP.LOB_MAP_DATA"; SQL statement:
>> >
>> > INSERT INTO INFORMATION_SCHEMA.LOB_MAP(**LOB, SEQ, HASH, BLOCK)
>> VALUES(?, ?, ?, ?) [50000-150]
>> >
>> > at org.h2.message.DbException.**getJdbcSQLException(**
>> DbException.java:327)
>> >
>> > at org.h2.message.DbException.**get(DbException.java:156)
>> >
>> > at org.h2.message.DbException.**convert(DbException.java:279)
>> >
>> > at org.h2.table.RegularTable.**addRow(RegularTable.java:143)
>> >
>> > at org.h2.command.dml.Insert.**insertRows(Insert.java:126)
>> >
>> > at org.h2.command.dml.Insert.**update(Insert.java:86)
>> >
>> > at org.h2.command.**CommandContainer.update(**CommandContainer.java:69)
>> >
>> > at org.h2.command.Command.**executeUpdate(Command.java:**209)
>> >
>> > at org.h2.jdbc.**JdbcPreparedStatement.execute(**
>> JdbcPreparedStatement.java:**181)
>> >
>> > at org.h2.store.LobStorage.**storeBlock(LobStorage.java:**488)
>> >
>> > at org.h2.store.LobStorage.**addLob(LobStorage.java:363)
>> >
>> > at org.h2.store.LobStorage.**createBlob(LobStorage.java:**578)
>> >
>> > at org.h2.value.ValueLobDb.link(**ValueLobDb.java:155)
>> >
>> > at org.h2.index.PageDataIndex.**add(PageDataIndex.java:106)
>> >
>> > at org.h2.table.RegularTable.**addRow(RegularTable.java:125)
>> >
>> > at org.h2.command.dml.Insert.**insertRows(Insert.java:126)
>> >
>> > at org.h2.command.dml.Insert.**upda> To unsubscribe from this group
>> and stop receiving emails from it, send an email to h2-database...@**
>> googlegroups.com.
>> > To post to this group, send email to [email protected].
>> > Visit this group at
>> > http://groups.google.com/**group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en>
>> .
>> > For more options, visit
>> > https://groups.google.com/**groups/opt_out<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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.