Thanks Bryan, Unfortunately, I'm working with an existing Oracle DDL script which has separate FK definitions so I can't easily include them in the table definition. I'm just running the Oracle DDL script through a reformatting routine that I wrote which removes tokens and statements that Derby doesn't like, and running the reformatted version in IJ.
Anyway, I've got a solution, albeit not an ideal one. Having done a bit more testing, I have found that: 1) The main script runs fine if don't create the LOGICPROPERTY table 2) Creating the LOGICPROPERTY table in another script, in another session, still raises the OOME 3) Creating the LOGICPROPERTY table in several small scripts, in another session, still raises the OOME 4) Creating the LOGICPROPERTY table in several small scripts, running each one in a separate IJ session, is successful. It's like the definition of LOGICPROPERTY + its 50-odd indexes + its 50-odd constraints is just too much for a single IJ session to handle, even if I feed it in several chunks. The only solution seems to be to create it one step at a time, in separate IJ sessions. I'll happily share the script if that would help; at around 650k, I think it's too big for the list. If anyone would like to see it, please e-mail me off-list. Regards, Nick -----Original Message----- From: Bryan Pendleton [mailto:[EMAIL PROTECTED] Sent: 14 August 2007 15:41 To: Derby Discussion Subject: Re: IJ out of memory > Failed Statement is: ALTER TABLE logicproperty > ADD CONSTRAINT r_186 > FOREIGN KEY > ( zone_id ) > REFERENCES zone > ON DELETE CASCADE You can include the foreign key constraints in the initial table definition itself, instead of creating the table and then adding the constraints to it later. Do you still get the OutOfMemory problem if you include all the foreign key constraints in the table definition itself, rather than as separate ALTER TABLE statements? Also, can you share the entire create_db.sql script? thanks, bryan
