Convert a mysql database to h2

1,449 views
Skip to first unread message

piras...@gmail.com

unread,
Feb 12, 2008, 7:03:39 AM2/12/08
to H2 Database
first sorry for my english.. ;)

Thanx in advance
This is my first post, yesterday I discovered H2 solution, really
interesting!

now I'm using a mysql database for my application, but I would create
a trial version of this application using H2 database, than I thought
to try it with a migration tool.

It is not so easy to do this , but finally I've discovered Squirrel
SQL where theoretically it could be possible to convert but I obtain
this error:

handleError: exception=Syntax error in SQL statement CREATE UNIQUE
INDEX PRIMARY[*] ON TABLEXXX(ID) ; expected identifier; SQL statement:
CREATE UNIQUE INDEX PRIMARY ON tablexxx(id) [42001-66]

1. question: do you know this error?

and
with h2 server in the browser i obtain a -----> java heap space

2. question: How can I tune the performance of the server?


tanx for all
Ciao
Andrea

Thomas Mueller

unread,
Feb 13, 2008, 2:54:07 PM2/13/08
to h2-da...@googlegroups.com
Hi,

now I'm using a mysql database
 
Squirrel SQL where theoretically it could be possible to convert

Maybe you could execute the SQL script that is created using "mysqldump". Tell me if this doesn't work!


handleError: exception=Syntax error in SQL statement CREATE UNIQUE
INDEX PRIMARY[*] ON TABLEXXX(ID) ; expected identifier; SQL statement:
CREATE UNIQUE INDEX PRIMARY ON tablexxx(id) [42001-66]

Strange, I tried this statement and it doesn't work in any database I have tested (also not in MySQL). Maybe it is a bug of Squirrel SQL? I tried this:

DROP TABLE TEST;
CREATE TABLE TEST(ID INT);
CREATE UNIQUE INDEX PRIMARY ON TEST(ID);

It doesn't work in: H2, MySQL, Apache Derby, PostgreSQL, HSQLDB

with h2 server in the browser i obtain a -----> java heap space

Is this when creating an index? I have found this problem, it will be fixed in the next release. A workaround is to use a very low cache size (SET CACHE_SIZE 2000) when creating indexes.

Regards,
Thomas

Volk

unread,
Feb 17, 2008, 3:12:44 PM2/17/08
to H2 Database
Hello, Andrea.
Try to use Scriptella ETL (http://scriptella.javaforge.com) - it is
specially designed for these needs.

Regards,
Kirill

On 12 фев, 14:03, "piraster...@gmail.com" <piraster...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages