Closed GoogleCodeExporter closed 9 years ago
Hi,
You need to use the recovery tool to recover the database. The tools is
available
from within the H2 Console (Tools / Recover) or as a command line tool
(org.h2.tools.Recover). This will create a .sql script that you can edit. You
can
then remove the primary key index from this file (comment out the line CREATE
PRIMARY
KEY ON SYSTEMDB.SHEDULED_JOBS) and run the script using the RunScript tool or
RUNSCRIPT command (creating a new database). You need to use another user name
to
create the database than the one used in the SQL script, otherwise you get an
exception 'user already exists'. Then you can connect to the database and
delete the
duplicate row, afterwards create the primary key.
The .trace.db file contains the following entries:
No space left on device; /disks/diskpool/opt/jane1/sysdb/systemdb.418473.log.db
This could be the reason for the corruption:
maybe H2 doesn't do the right thing after this problem. I need to test it.
The database was created with version 1.0.72 (SET CREATE_BUILD 72). Quite a few
bugs
were fixed since then, maybe the database was broken before but it didn't show
up
because the index was never recreated.
The log file number (418473) is very high. I would like to understand why.
Do you open and close the database a lot, or do you call CHECKPOINT a lot?
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 3 Apr 2009 at 2:01
Hi
Thanks very much for your detailed answer.
I will try your recover guideline.
answer to your question:
We don't use checkpoint.
We don't open close the database very often.
The database is quite old and it runs for a long time.
We are using every day the h2 BACKUP command to make online backups.
Perhaps there is a Bug in your application.
best regards
Thomas
Original comment by thomas.f...@swissbyte.com
on 6 Apr 2009 at 11:59
Hi Thomas
The high log file nummer is perhpaps a result from the startup loop
best regards
Thomas
Original comment by thomas.f...@swissbyte.com
on 7 Apr 2009 at 8:09
Hi,
> The high log file nummer is perhpaps a result from the startup loop
Yes, that's possible...
> We are using every day the h2 BACKUP command to make online backups.
That's quite good, however there is a better way: use the command SCRIPT
instead. See
http://www.h2database.com/html/grammar.html#script
Example:
SCRIPT TO 'backup.zip' COMPRESSION ZIP
Original comment by thomas.t...@gmail.com
on 13 Apr 2009 at 3:47
I'm setting the bug to 'Fixed' for now. Please re-open or create a new bug if
you see
the problem again using a fresh database.
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 27 Apr 2009 at 6:32
Original issue reported on code.google.com by
thomas.f...@swissbyte.com
on 31 Mar 2009 at 1:23