Closed GoogleCodeExporter closed 9 years ago
Hi,
The [*] is added to the place where the syntax error occurred. It's weird,
because
there is no syntax error: I successfully ran this part of the script. I could
also
ran the rest of the script without problems. I don't have the IBM JVM however,
I use
Mac OS X and a Sun JVM (1.5).
I used the H2 Console (with -Xmx1024m) and ran:
-- setting to speed up import (reset afterwards)
set log 0;
set cache_size 32*1024;
set lock_mode 0;
set undo_log 0;
set write_delay 5000;
set throttle 1; -- don't use 100% CPU
runscript from '~/Downloads/systemdb_zuz00i-0003_20090709.zip' compression zip;
-- should now reset the settings
Import took 48 min
5.97 GB data file
4.72 GB index file
Original comment by thomas.t...@gmail.com
on 10 Jul 2009 at 6:52
Hi Thomas,
it really seems to be a problem with the IBM JVM. I tried to load the data on
other
machines with different Sun JVM's (v1.5, v1.6) and different H2 versions
(v1.0.78,
v1.1.115) and there was no problem at all.
One more question: I don't use the H2 Console. Is it possible to supply this
setting
parameters as 'set log 0' or 'set undo_log 0' to the RunScript tool?
Regards, Kilian Felder
Original comment by kilian.f...@gmail.com
on 14 Jul 2009 at 5:25
Hi,
> parameters as 'set log 0' or 'set undo_log 0' to the RunScript tool?
Yes, any settings can be passed in the database URL:
jdbc:h2:~/test;log=0;undo_log=0
Original comment by thomas.t...@gmail.com
on 17 Jul 2009 at 4:39
Please tell me if you know more
(is it really a bug of the IBM VM, how did you work around the problem).
Original comment by thomas.t...@gmail.com
on 18 Jul 2009 at 9:57
Hi Thomas,
Your comment 3: Thanks for the info. I had to mask the semicolon on the command
line,
otherwise I received an error. Command is successful with:
jdbc:h2:~/test\;log=0\;undo_log=0
Your comment 4: I don't know exactly if it's a bug of the IBM VM but: IBM VM 5
and 6
are not yet tested on zLinux (s390x) with SLES 11 installed (see
http://www.ibm.com/developerworks/java/jdk/linux/tested.html and check for
'System z
64-bit'). My workaround to restore the DB on this zLinux system: I took IBM VM
4 and
therefore a lower H2 release. And it worked ..
OS: SUSE Linux Enterprise Server 11 (s390x) PATCHLEVEL = 0
Java: Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxz64142-20080923 (SR12)
(JIT
enabled: jitc))
H2: V1.1.113
Regards,
Kilian Felder
Original comment by kilian.f...@gmail.com
on 20 Jul 2009 at 10:59
> I had to mask the semicolon on the command line, otherwise I received an
error.
What error message and stack trace did you get?
Is the database URL in a properties file?
Java 1.4 is no longer supported by Sun, that's why I thought H2 doesn't need to
support it... It is still possible to create a jar file for Java 1.4 by using
Retrotranslator (http://retrotranslator.sourceforge.net/).
Original comment by thomas.t...@gmail.com
on 21 Jul 2009 at 3:23
Command and appropriate stack trace ...
% /opt/ibm/java-i386-60/jre/bin/java -Xmx1024m -cp
/opt/jane1/master/lib/h2-1.1.115.jar org.h2.tools.RunScript -url
jdbc:h2:/disk2/kfe/db/sysdb/systemdb;log=0;undo_log=0 -user sa -script
systemdb.zip
-options compression zip
Exception in thread "main" org.h2.jdbc.JdbcSQLException: IO Exception:
java.io.FileNotFoundException: backup.sql (No such file or directory);
backup.sql
[90031-115]
at org.h2.message.Message.getSQLException(Message.java:105)
at org.h2.message.Message.convertIOException(Message.java:295)
at org.h2.tools.RunScript.process(RunScript.java:317)
at org.h2.tools.RunScript.run(RunScript.java:140)
at org.h2.tools.RunScript.main(RunScript.java:68)
Caused by: java.io.FileNotFoundException: backup.sql (No such file or directory)
at java.io.FileInputStream.<init>(FileInputStream.java:112)
at java.io.FileInputStream.<init>(FileInputStream.java:72)
at org.h2.store.fs.FileSystemDisk.openFileInputStream(FileSystemDisk.java:362)
at org.h2.util.FileUtils.openFileInputStream(FileUtils.java:229)
at org.h2.tools.RunScript.process(RunScript.java:182)
at org.h2.tools.RunScript.process(RunScript.java:312)
... 2 more
-bash: -user: command not found
But this is the normal behavior when you use the Linux Command Line because the
semicolon is treated as the command delimiter. Therefore "log=0" and
"undo_log=0 ..."
are treated as separate commands. No problem for me. Only good to know.
Regards,
Kilian Felder
P.S. Thanks for the hint with the Retrotranslator!
Original comment by kilian.f...@gmail.com
on 21 Jul 2009 at 7:14
Hi,
I didn't know about that... I will change the documentation of the various
tools that
support an URL to -url "<url>" - I hope that's saver. Thanks for your help!
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 31 Jul 2009 at 6:48
Original issue reported on code.google.com by
kilian.f...@gmail.com
on 10 Jul 2009 at 7:41Attachments: