thank you for the hint, that was the problem
beside recovering the structure and data of the database, H2 also recovers 
the already written trace output



Am Donnerstag, 18. Juli 2013 10:33:01 UTC+2 schrieb Kartweel:
>
>  If you look inside the zip file of your backup are there trace files in 
> there?
>
> On 18/07/2013 4:14 PM, EDV-Services wrote:
>  
> Hi Thomas,
>
> I thought the same, I thought it could be a bug in my application.
> Then I restored my latest backup file by using the web interface of H2 by 
> clicking on "Tools" -> "Restore" -> "Start".
> And the result was the same: Trace-output of error messages in 
> trace.db-file even if I remove the trace file before starting to restore.
> That's why I offered you to send you my backup file so you can try it with 
> the web interface, too.
>
> I'm 100% sure, it has nothing to do with my application.
> The only mistake I could have done was when I created my database the 
> first time and then accessed it without the trace = 0 parameters in my db 
> url.
> I guess H2 saved the trace parameters TRACE_LEVEL_SYSTEM_OUT = 1 and 
> TRACE_LEVEL_FILE = 1 (default) inside the database files so changing the 
> url parameters later won't affect anything.
>
> Nevertheless, thank you for your reply again.
>
> Best regards,
> Michael
>
>
>
> Am Mittwoch, 17. Juli 2013 18:35:14 UTC+2 schrieb Thomas Mueller: 
>>
>> Hi, 
>>
>>  > I definitely use the "h2-1.3.172.dll" file.
>>
>>  Yes, I understand.
>>
>>  > I understand that my trace-db file contains old dates but I don't 
>> understand why
>>
>>  Well, the most simple explanation is that those files are old files. 
>> Probably your application restored them from somewhere (I think I wrote 
>> that already). You need to figure out why this happens. This is your 
>> application, and I can't really help you there. This is not a problem of H2.
>>
>>  > I would like to send you my backup file, so you can try to restore 
>> the file on your machine.
>>
>>  Sorry, I'm not quite sure how this would help. It seems you need to 
>> figure out what's wrong with your application, why it restores old 
>> .trace.db files. This is your application, and I'm not able to help you 
>> with that.
>>
>>  Regards,
>> Thomas
>>
>>  
>>  
>>   
>>
>> On Wed, Jul 17, 2013 at 12:50 PM, EDV-Services <edvservi...@web.de>wrote:
>>
>>> Hi Thomas,
>>>
>>> thank you again for your reply.
>>>
>>> I definitely use the "h2-1.3.172.dll" file. I've downloaded the jar file 
>>> some days ago and I used IKVM to transform the jar file into a dll file to 
>>> be able to use H2 in my .NET project.
>>> I understand that my trace-db file contains old dates but I don't 
>>> understand why as I don't know anything about the internal H2 db processes.
>>> All I can say is that I delete the trace-file before doing a restore and 
>>> then that output is created. 
>>>
>>>
>>> > One explanation is that you restore old files over existing files
>>>
>>>  Thats true. In my application you have a database running and you can 
>>> do backups and restores whenever you want.
>>> When I do a restore, the database already exists. I don't delete the 
>>> database before I restore an old backup file.
>>> Is that the problem?
>>>
>>> Also true is, that before I haven't used the same URL as now.
>>> As I told you, I've added the two parameters 
>>> "TRACE_LEVEL_FILE=0;TRACE_LEVEL_SYSTEM_OUT=0;" later.
>>> Maybe H2 saves the url parameters into the database files on first 
>>> database connection so if you add these two parameters to your connection 
>>> URL later, then they won't affect the trace output anymore.
>>>
>>> I would like to send you my backup file, so you can try to restore the 
>>> file on your machine.
>>> Are you okay with that? If yes, then please tell me your email address.
>>>
>>> Best regards
>>> Michael
>>>
>>>
>>> Am Dienstag, 16. Juli 2013 08:42:16 UTC+2 schrieb Thomas Mueller: 
>>>  
>>>> Hi, 
>>>>
>>>>  I understand that it doesn't work for your case, but I'm afraid I 
>>>> can't help you much because it works for me, and so far you didn't provide 
>>>> enough information to reproduce the problem.
>>>>
>>>>  Just a few things I noticed: 
>>>>
>>>>  * You wrote you use the latest version of H2, but in fact the latest 
>>>> error message you got is from an older version (1.3.170). Reason: the 
>>>> build 
>>>> number is included in the error code, which is [42001-170]. So the build 
>>>> is 
>>>> 170.
>>>>
>>>>  * The .trace.db file contains old dates. You wrote you reproduce the 
>>>> problem now, but the error message starts with  "07-09 12:51:43". So it 
>>>> clearly was written at 2013-07-09 and not July 15th. The same with older 
>>>> messages.
>>>>
>>>>  * You seem to backup and possibly restore files. One explanation is 
>>>> that you restore old files over existing files.
>>>>
>>>>  * My guess is that you didn't always use the database URL you 
>>>> provided.
>>>>
>>>>  That's all I can say right now. I don't think this is a bug in H2.
>>>>
>>>>  Regards,
>>>> Thomas
>>>>
>>>>  
>>>>  
>>>> On Monday, July 15, 2013, EDV-Services wrote:
>>>>
>>>>> Sorry again, now I deleted all the data in all database tables except 
>>>>> for the table "EINSTELLUNGEN"
>>>>> The full content of the trace.db-file is as follows:
>>>>>
>>>>> 07-09 12:51:43 jdbc[2]: exception
>>>>> org.h2.jdbc.JdbcSQLException: Syntax Fehler in SQL Befehl 
>>>>> "EINSTELLUNGEN"; erwartet "EXPLAIN, EXECUTE, {"
>>>>> Syntax error in SQL statement "EINSTELLUNGEN"; expected "EXPLAIN, 
>>>>> EXECUTE, {"; SQL statement:
>>>>> EINSTELLUNGEN [42001-170]
>>>>>
>>>>> It seems like the errors only occur when H2 tries to restore the 
>>>>> database data.
>>>>> And what does that error message mean? EXPLAIN, EXECUTE?
>>>>>
>>>>>
>>>>> Am Sonntag, 14. Juli 2013 16:14:31 UTC+2 schrieb EDV-Services: 
>>>>>>
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> I've developed a software project and I've noticed that there is a 
>>>>>> file in my user folder called "mydb.trace.db".
>>>>>> When I open this file, I see a lot of sql statements exposing some 
>>>>>> tables of my database.
>>>>>> I use the following connection string: 
>>>>>> jdbc:h2:~/mydb;TRACE_LEVEL_FILE=0;TRACE_LEVEL_SYSTEM_OUT=0;CIPHER=AES"
>>>>>> I thought these two TRACE parameters in my connection string must be 
>>>>>> enough to avoid creating the mydb.trace.db file.
>>>>>>
>>>>>> That's the trace output from "mydb.trace.db":
>>>>>>
>>>>>> 02-25 11:47:33 jdbc[2]: exception
>>>>>> org.h2.jdbc.JdbcSQLException: Syntax Fehler in SQL Befehl "INSERT 
>>>>>> INTO CUSTOMER(xxx, yyy) VALUES('xxx', 'yyy');
>>>>>> ...
>>>>>>
>>>>>> I'm using the latest version "h2-1.3.172.dll" (dll file created from 
>>>>>> jar file with ikvm).
>>>>>> The trace entries occur when i use the following vb.net code:
>>>>>>
>>>>>> Dim restore As New Restore()
>>>>>> restore.execute("backup.bck", "~", "mydb")
>>>>>>
>>>>>> I don't want hackers to be able to see my database content so imho 
>>>>>> it's a serious security flaw.
>>>>>> Can anyone give me a hint what I'm doing wrong?
>>>>>>
>>>>>> Best regards
>>>>>> Michael
>>>>>>
>>>>> -- 
>>>>> 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 h2-database+unsubscr...@googlegroups.com.
>>>>> To post to this group, send email to h2-database@googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>> 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 h2-database+unsubscr...@googlegroups.com.
>>> To post to this group, send email to h2-database@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/h2-database.
>>> 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 h2-database...@googlegroups.com <javascript:>.
> To post to this group, send email to h2-da...@googlegroups.com<javascript:>
> .
> Visit this group at http://groups.google.com/group/h2-database.
> 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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to