hello sir,

Iam using latest version h2 database h2-1.3.169
I have deleted some tables from my H2 database...Now i want to shrink the 
empty spaces..
but according to forums i got the information as 
H2 doesn't shrink the data, or index files so it's possible there is empty 
space in it. 

so i can use script files for for it to take backup.sql
and again run the script
This is my url
jdbc:h2:tcp://localhost/~/abc;mvcc=true;lock_timeout=100000;lock_mode=0;auto_reconnect=true;auto_server=true;AUTOCOMMIT=OFF

But iam getting an exception as 
Out of memory.; SQL statement:
SCRIPT<https://192.168.123.109:8082/tools.do?jsessionid=c723fcac7741c8cc34df4216a1e96d2f#>
*
*
   
   1. *How to increase the memory and **how to run the script successfully
   *
   2. *Is this really help full in place of shrinking the data or we can 
   any other method...to shrink the empty space*

Please help me...as soon as possible ....Thanks in advance...

 iam getting an exception as 
Out of memory.; SQL statement:
SCRIPT 
[90108-169]<https://192.168.123.109:8082/tools.do?jsessionid=c723fcac7741c8cc34df4216a1e96d2f#>90108/90108
 
(Help) <http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c90108>
org.h2.jdbc.JdbcSQLException: Out of memory.; SQL statement:
SCRIPT [90108-169] 
    at 
org.h2.message.DbException.getJdbcSQLException(DbException.java:329<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=329&build=169>)
 

    at 
org.h2.message.DbException.get(DbException.java:158<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=158&build=169>)
 

    at 
org.h2.message.DbException.convert(DbException.java:275<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=275&build=169>)
 

    at 
org.h2.command.Command.executeQuery(Command.java:195<http://h2database.com/html/source.html?file=org/h2/command/Command.java&line=195&build=169>)
 

    at 
org.h2.server.TcpServerThread.process(TcpServerThread.java:308<http://h2database.com/html/source.html?file=org/h2/server/TcpServerThread.java&line=308&build=169>)
 

    at 
org.h2.server.TcpServerThread.run(TcpServerThread.java:149<http://h2database.com/html/source.html?file=org/h2/server/TcpServerThread.java&line=149&build=169>)
 

    at java.lang.Thread.run(Unknown Source) 
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded 

    at 
org.h2.engine.SessionRemote.done(SessionRemote.java:567<http://h2database.com/html/source.html?file=org/h2/engine/SessionRemote.java&line=567&build=169>)
 

    at 
org.h2.command.CommandRemote.executeQuery(CommandRemote.java:151<http://h2database.com/html/source.html?file=org/h2/command/CommandRemote.java&line=151&build=169>)
 

    at 
org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:76<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=76&build=169>)
 

    at 
org.h2.tools.Script.process(Script.java:172<http://h2database.com/html/source.html?file=org/h2/tools/Script.java&line=172&build=169>)
 

    at 
org.h2.tools.Script.execute(Script.java:153<http://h2database.com/html/source.html?file=org/h2/tools/Script.java&line=153&build=169>)
 

    at 
org.h2.tools.Script.execute(Script.java:133<http://h2database.com/html/source.html?file=org/h2/tools/Script.java&line=133&build=169>)
 

    at 
org.h2.tools.Script.runTool(Script.java:101<http://h2database.com/html/source.html?file=org/h2/tools/Script.java&line=101&build=169>)
 

    at 
org.h2.server.web.WebApp.tools(WebApp.java:390<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=390&build=169>)
 

    at 
org.h2.server.web.WebApp.process(WebApp.java:235<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=235&build=169>)
 

    at 
org.h2.server.web.WebApp.processRequest(WebApp.java:164<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=164&build=169>)
 

    at 
org.h2.server.web.WebThread.process(WebThread.java:137<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=137&build=169>)
 

    at 
org.h2.server.web.WebThread.run(WebThread.java:93<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=93&build=169>)
 

    at java.lang.Thread.run(Unknown Source) 



On Wednesday, May 27, 2009 12:34:40 AM UTC+5:30, Dror wrote:
>
> You should 
> increase your Heap memory. 
> try to add the following to your java command line. 
> XX:MaxPermSize=128m -Xms256m -Xmx1024m 
> Regards 
> Dror 
>
> On May 25, 3:34 pm, "Alexander.Sirenko" <[email protected]> 
> wrote: 
> > My connection string is "jdbc:h2:file:c:\\db/tesh2;CACHE_SIZE=50000". 
> > I think, my database stored on disk. 
> > 
> > On May 25, 10:53 am, Steve McLeod <[email protected]> wrote: 
> > 
> > 
> > 
> > > Hi Alexander, 
> > 
> > > Can you post your database connection url? 
> > 
> > > My guess is that you have an in-memory database and are using the 
> > > default Java memory configuration. If that's the case, you'll need to 
> > > start up your program with increased heap size. 
> > 
> > > Regards, 
> > 
> > > Steve 
> > 
> > > On May 24, 10:04 pm, "Alexander.Sirenko" <[email protected]> 
>
> > > wrote: 
> > 
> > > > Hello, 
> > > > I have some large table 
> > > > wordforms(key INT NOT NULL PRIMARY KEY AUTO_INCREMENT, 
> > > >                 key_base INT, 
> > > >                 name VARCHAR(50), 
> > > >                 type VARCHAR(10), 
> > > >                 isProcessed BOOLEAN ) 
> > > > with about 1 300 000 entries. 
> > 
> > > > In my Java program I make query "SELECT key FROM wordforms" to get 
> all 
> > > > keys. 
> > > > Executing query causes exception: 
> > 
> > > > Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap 
> > > > space 
> > > >         at org.h2.value.Value.cache(Value.java:338) 
> > > >         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:620) 
> > > >         at org.h2.table.TableData.read(TableData.java:607) 
> > > >         at org.h2.store.DiskFile.getRecord(DiskFile.java:595) 
> > > >         at org.h2.store.Storage.getRecord(Storage.java:94) 
> > > >         at org.h2.index.ScanIndex.getNextRow(ScanIndex.java:258) 
> > > >         at org.h2.index.ScanCursor.next(ScanCursor.java:71) 
> > > >         at org.h2.table.TableFilter.next(TableFilter.java:318) 
> > > >         at org.h2.command.dml.Select.queryFlat(Select.java:491) 
> > > >         at org.h2.command.dml.Select.queryWithoutCache(Select.java: 
> > > > 559) 
> > > >         at org.h2.command.dml.Query.query(Query.java:233) 
> > > >         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: 
> > > > 75) 
> > 
> > > > // NetBeans error message 
> > 
> > > > I use h2.1.1.111 in embedded mode. 
> > > > I tried different CACHE_SIZE from CACHE_SIZE=25000 to 
> > > > CACHE_SIZE=200000 
> > 
> > > > Database includes other tables and it is more than 1.5Gb- Hide 
> quoted text - 
> > 
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/tdRC-O4BgPkJ.
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