db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas J. Taylor" <thomas.tay...@itqa.miami.edu>
Subject RE: Using DdlUtils to Migrate Databases to Derby (MySQL-to-Derby)
Date Sun, 12 Mar 2006 23:20:08 GMT
I tried running DDLUtils to convert one of our existing MySQL databases to
Derby. It got to the point of importing data from the data.xml file but
failed due to an 'Data Truncation' Exception converting from LONG VARCHAR to
VARCHAR(32700).

Attached are the build.xml ANT script for export/import of the database and
a copy of the MS-DOS command prompt output.

My Environment:
Windows XP SP2
ANT 1.6.5
Derby 10.1.1.0
MySQL 4.1.16
MySQL Connector 3.0.14
 
As a side note:
We use MySQL and Derby to host basically the same database. The Derby DDL
scripts use VARCHAR(32700) or CLOB as the 'LONG VARCHAR' columns in MySQL,
depending on whether we need to compare the contents of the column in
queries. Other differences include Derby uses "INTEGER IDENTITY GENERATE BY
DEFAULT" while MySQL uses "INTEGER NOT NULL AUTO_INCREMENT"

Thomas

-----Original Message-----
From: Jean T. Anderson [mailto:jta@bristowhill.com] 
Sent: Friday, March 10, 2006 6:39 PM
To: Derby Discussion
Subject: Re: Using DdlUtils to Migrate Databases to Derby

David W. Van Couvering wrote:
> Nice!  Have you tried migrating from another database?  If I read it 
> right, your example shows migrating from Derby to Derby :)

Nope, I don't have any other databases handy -- I'd love to hear anyone's
experience on how well this strategy works for a source database that isn't
Derby. In particular, I'm wondering how much the schema file dumped from the
source database might need to be manually tweaked.

 -jean

> David
> 
> Jean T. Anderson wrote:
> 
>> I added a new example on using DdlUtils to migrate databases to Derby:
>>
>>    http://db.apache.org/derby/integrate/db_ddlutils.html
>>
>> I used Derby as both the source and target database -- and it was 
>> really easy.  :-)  I'd be especially interested to hear how well this 
>> strategy works for a source database that isn't Derby.
>>
>> regards,
>>
>>  -jean


Mime
View raw message