Hello.

The BACKUP command most likely is not related (if it isn't invoked by 
another process with different version of H2). But there are three 
suspicious options in your connection URL.

1. If you use the retry: subsystem, I assume that you interrupt your 
threads that perform calls into database. It's a bad practice and usually 
it leads to corruption of embedded databases (TCP clients aren't affected), 
but if you can't change your application to avoid it, it's better to use 
the newer async: file system, the retry: file system has some own problems.

2. DB_CLOSE_ON_EXIT=FALSE means that H2 will be unable to shutdown the 
database properly automatically during termination of the Java process. If 
you use this option, you must do it by yourself using the SHUTDOWN command. 
Your process must wait for its completion and it should not try to reopen 
the database after it.

3. The AUTO_SERVER=TRUE option is used to connect to the database from a 
multiple applications without a TCP server. Usually it's better and safer 
to use a normal server, but if you can't do it, you may use this option. 
But you should ensure that all applications have exactly the same version 
of H2. For example, the similar failure was reported multiple time by users 
of IntellyJ IDEA Database tool, it was shipped with H2 1.4.196 and attempts 
to mix 1.4.196 and 1.4.200 led to such corruption. Only the TCP server and 
its clients may have different versions legally. With auto server versions 
should be the same.

4. If your database was created by a some older version, it's better to 
export it into an SQL script with a SCRIPT TO 'filename.sql' command, 
create a new database with 1.4.200, and execute a RUNSCRIPT FROM 
'filename.sql' in it to create a database that definitely doesn't inherit 
any problems from older versions.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/5a0bc11a-3fb9-45fd-9883-c2bb05bf00e4%40googlegroups.com.

Reply via email to