Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 18273 invoked from network); 18 Dec 2008 01:24:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2008 01:24:59 -0000 Received: (qmail 38197 invoked by uid 500); 18 Dec 2008 01:25:11 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 38174 invoked by uid 500); 18 Dec 2008 01:25:11 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 38165 invoked by uid 99); 18 Dec 2008 01:25:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2008 17:25:10 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jamianb@gmail.com designates 74.125.44.28 as permitted sender) Received: from [74.125.44.28] (HELO yx-out-2324.google.com) (74.125.44.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Dec 2008 01:24:56 +0000 Received: by yx-out-2324.google.com with SMTP id 3so122496yxj.85 for ; Wed, 17 Dec 2008 17:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=+K44mJfSy9p+lOKvQ/BbKbU/Omn/Q1XkCaQ9ODtiRao=; b=huo1HW0gwyhcKb474CYGEHJaCWJwkhyAJFf2kPBNL9RrcDCVneJio/MKvwr3egEYCh vP78T8SqmFBz0sy+GZBfVKWKwQCaXaxSKsU3rSm6UC6qTxJrIIdJnyJgTu+D42AaPDe7 1TKWbc7LWofohAylosyPcnCJ46JSG23npHxpw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=hIrL2gnXzwezTUp1zqQURlMwTxN6HS/3DOWHeWOHU1JTxl5m6pUC1rSCzxVHJAOi9b 9gWxjk2yud3a183vZjgtMLyEI2Q/a2DPBtm9IKRJanu8PpMTvUf1DEGjGoYDcd8+p8bz V40UQK7su0ufS1H1vkRk84/SMwmm+0QVe9f08= Received: by 10.150.11.6 with SMTP id 6mr2414804ybk.134.1229563475026; Wed, 17 Dec 2008 17:24:35 -0800 (PST) Received: by 10.151.134.2 with HTTP; Wed, 17 Dec 2008 17:24:34 -0800 (PST) Message-ID: <2bbc8f530812171724v1c726e17m891dd3ed1f9d7f2a@mail.gmail.com> Date: Thu, 18 Dec 2008 12:24:34 +1100 From: "Damian Carey" To: derby-user@db.apache.org Subject: How to get a Derby schema.sql so we can build the next DB? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org 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