Schema Disappear from database

46 views
Skip to first unread message

R. Menezes

unread,
Dec 9, 2019, 11:22:44 PM12/9/19
to H2 Database
Hello Everyone,

I have been using H2 for 2 years and I am having problems with data loss. 

Several times I receive the message that my database Schema in H2 (embedded) file had not been found.

My H2 file with 14MB bank becomes a 12KB file when my Schema "DATA_DB" is not found. 

I'm sending *.trace file  and the H2 file with 12KB after schema loss.

Bellow are my  H2 flags and details to connect in my H2 file

Please help me.

=======================
Schema: DATA_DB
User: adm
pass: 123


Connection Class and flags:

private ConnectH2() {
try {
Class.forName("org.h2.Driver");
con = DriverManager.getConnection("jdbc:h2:C:/system/database";SCHEMA=DATA_DB;AUTO_SERVER=TRUE;DEFRAG_ALWAYS=TRUE;COMPRESS=TRUE;", "adm", "123");
} catch (Exception e) {
System.out.println(e.getMessage());
}
}

database.trace.db
database.mv.db

Noel Grandin

unread,
Dec 10, 2019, 2:14:29 AM12/10/19
to h2-da...@googlegroups.com
I don't see any signs of corruption.

Most likely what is happening is that your anti-virus is quarantining your database file, and your application is
creating a new file where the database used to be.

R. Menezes

unread,
Dec 10, 2019, 8:16:13 AM12/10/19
to H2 Database
Hi Noel,

That is the problem.... There is no signs of corruption and most of our users dont have anti-virus,

And like a magic the Schema and all data Disappear.

Do you have any idea?? 

In our software we have a lot of threads that acess the database and write data simultaneously in h2 file. 
Is it a problem?

Thanks,

Noel Grandin

unread,
Dec 10, 2019, 8:25:19 AM12/10/19
to h2-da...@googlegroups.com


On 2019/12/10 3:16 PM, R. Menezes wrote:
>
> In our software we have a lot of threads that acess the database and write data simultaneously in h2 file.
> *Is it a problem?*
>

No, that is not a problem.
Reply all
Reply to author
Forward
0 new messages