I am trying to recover a corrupted database. I run the recover tool against
it, which results in a SQL file. I then run this sql file unmodified
against a fresh database, and get the following stack trace:
08-17 10:31:49 jdbc[2]: exception
org.h2.jdbc.JdbcSQLException: Sequence
"SYSTEM_SEQUENCE_121B237C_678D_4710_98F7_1CF6C65B55DE" already exists; SQL
statement:
CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_121B237C_678D_4710_98F7_1CF6C65B55DE
START WITH 3701 BELONGS_TO_TABLE [90035-171]
at
org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:169)
at org.h2.message.DbException.get(DbException.java:146)
at org.h2.command.ddl.CreateSequence.update(CreateSequence.java:50)
at
org.h2.command.dml.RunScriptCommand.execute(RunScriptCommand.java:77)
at
org.h2.command.dml.RunScriptCommand.update(RunScriptCommand.java:56)
at org.h2.command.CommandContainer.update(CommandContainer.java:75)
at org.h2.command.Command.executeUpdate(Command.java:230)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
at org.h2.tools.Shell.execute(Shell.java:429)
at org.h2.tools.Shell.promptLoop(Shell.java:270)
at org.h2.tools.Shell.runTool(Shell.java:148)
at org.h2.tools.Shell.main(Shell.java:80)
This happens consistently. Inspecting the SQL file i see this line three
times in different places:
INSERT INTO O_0 VALUES(48, 0, 3, 'CREATE SEQUENCE
PUBLIC.SYSTEM_SEQUENCE_121B237C_678D_4710_98F7_1CF6C65B55DE START WITH 3701
BELONGS_TO_TABLE');
I've also noted other duplications like tables create statements. Is it
just that the database is so horribly corrupted that it cannot be
recovered? This is a customer's data, so it would be great if something
could be done. Any help is appreciated.
--
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.