By the way, it looks like the DDLUtils failed on a MySQL LONG VARCHAR that we represent as a CLOB in Derby. Typically, the column content includes very long XML content.
All tables (alphabetically) before the import table's Exception seem to have imported correctly. No tables were imported after the Exception. Thomas -----Original Message----- From: Thomas J. Taylor [mailto:[EMAIL PROTECTED] Sent: Sunday, March 12, 2006 6:20 PM To: 'Derby Discussion'; [EMAIL PROTECTED] Subject: RE: Using DdlUtils to Migrate Databases to Derby (MySQL-to-Derby) 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:[EMAIL PROTECTED] 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
