Hi,

What version of H2 do you use? Could you post the complete stack trace
please? I believe you use an older version, and the problem might be
fixed in a newer one.

Regards,
Thomas

On Wed, Jun 3, 2009 at 10:21 AM, Mateusz Urbanik<[email protected]> wrote:
> Hi,
> I can't post the result of SCRIPT NODATA, because the schema of database is
> secret part of my project. I have about 35 tables, with about 5 to 20
> columns in it, the bigest size of column is varchar(2000), but it is the
> only one, for other strings I use varchar(255). In this database I have two
> tables which are the bigest: one has 25 000 rows of data, and second 280 000
> .
>
> I run script command from windows commandline:
> D:\Programs\H2\bin>java -cp h2*.jar org.h2.tools.Script  -url
> "jdbc:h2:C:\\path2db\myDB" -user "user" -password "secret" -script
> "c:\\backup.sql"
> and the result is:
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>         at org.h2.value.Value.cache(Value.java:335)
>         at org.h2.value.ValueString.get(ValueString.java:91)
>         at org.h2.store.DataPage.readValue(DataPage.java:623)
>         at org.h2.table.TableData.readRow(TableData.java:599)
>         at org.h2.table.TableData.read(TableData.java:586)
>         at org.h2.store.DiskFile.getRecord(DiskFile.java:607)
>         at org.h2.store.Storage.getRecord(Storage.java:94)
>         at org.h2.index.ScanIndex.getNextRow(ScanIndex.java:253)
>         at org.h2.index.ScanCursor.next(ScanCursor.java:71)
>         at org.h2.command.dml.ScriptCommand.query(ScriptCommand.java:258)
>         at org.h2.command.CommandContainer.query(CommandContainer.java:81)
>         at org.h2.command.Command.executeQueryLocal(Command.java:141)
>         at org.h2.command.Command.executeQuery(Command.java:122)
>         at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:76)
>         at org.h2.tools.Script.process(Script.java:158)
>         at org.h2.tools.Script.run(Script.java:109)
>         at org.h2.tools.Script.main(Script.java:57)
>
> My solution is of course to use more java heap space:
> java -Xmx1024m -cp h2*.jar org.h2.tools.Script  -url
> "jdbc:h2:C:\\path2db\myDB" -user "user" -password "secret" -script
> "c:\\backup.sql"
>
> I've tried to script this database from H2 console:
> SCRIPT SIMPLE TO 'aaaa.sql'
>
> It works OK :)
>
>
> 2009/6/1 Thomas Mueller <[email protected]>
>>
>> Hi,
>>
>> Do you have very large VARCHAR or BINARY columns in your database? If
>> yes I suggest to use CLOB or BLOB instead. Could you post the result
>> of SCRIPT NODATA?
>>
>> Did you try with the options described in
>> http://www.h2database.com/javadoc/org/h2/tools/Script.html#main(String[])
>> and http://www.h2database.com/html/grammar.html#script ?
>>
>> Regards,
>> Thomas
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to