> On Wed, Dec 17, 2008 at 7:24 PM, Damian Carey <[email protected]> wrote: >> Hi all, >> >> We're long term Java-Desktop-App-via-Hibernate-On-Postgres users >> trying to transition to Derby. >> >> When we deploy a new site we want to be able to (1) create the fresh >> database then (2) "run" schema.sql to construct the database schema, >> prior to (3) running the app and adding the data. >> >> With postgres we extract the schema.sql from an existing database >> (using pgAdminIII or whatever) and pump that raw SQL into the new >> database. Easy and 100% reliable. >> >> However, with Derby, I'm not sure how to get that SQL level snapshot >> of an existing schema that we can use. >> >> I can get the DDL from dblook, but I can't pump in DDL. I really >> don't want to add DdlUtils etc to our distribution. >> >> So >> (1) How do you get the raw SQL?? >> (2) What else would you suggest for transferring a schema from one >> DerbyDB to a new fresh DerbyDB? >> >> Any suggestions or advice would be greatly appreciated. >> >> Many thanks, >> -Damian >> >On Thu, Dec 18, 2008 at 12:32 PM, Sai Pullabhotla ><[email protected]> wrote: > Why not just copy the whole database folder from the source system to target? > > Sai Pullabhotla
Sai, Thanks for your response! There is no problem doing that on one machine, but the idea here is to distribute our app to hundreds or thousands of our customers, each with their own on-site database. As they use the app for the first time the new database is created and it's added. The schema.sql is perhaps 20K, but the empty database is perhaps 2MB. So I'm looking for a way to get the SQL so that we can create the database on the fly for each new customer. We currently also use that "SQL-on-startup" to modify the schema from time to time. It works like a charm with our Postgres infrastructure, but I'm not sure how best to retain those capabilities with Derby. Cheers, -Damian
