Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 16074 invoked from network); 1 Feb 2006 18:51:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Feb 2006 18:51:38 -0000 Received: (qmail 94655 invoked by uid 500); 1 Feb 2006 18:51:37 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 94452 invoked by uid 500); 1 Feb 2006 18:51:36 -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 94439 invoked by uid 99); 1 Feb 2006 18:51:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 10:51:36 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.110.150] (HELO e32.co.us.ibm.com) (32.97.110.150) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 10:51:35 -0800 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id k11IpCCV028536 for ; Wed, 1 Feb 2006 13:51:12 -0500 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id k11IrYR9155170 for ; Wed, 1 Feb 2006 11:53:34 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id k11IpCsd005830 for ; Wed, 1 Feb 2006 11:51:12 -0700 Received: from [127.0.0.1] (DMCSDJDT41P.usca.ibm.com [9.72.133.58]) by d03av01.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id k11IpBX2005815 for ; Wed, 1 Feb 2006 11:51:12 -0700 Message-ID: <43E1031F.5020903@apache.org> Date: Wed, 01 Feb 2006 10:51:11 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: Derby Discussion Subject: Re: Specifying the Derby Database Location References: <9b85c45f0601312126p4fb1ed82qb33ec9dc0f776f06@mail.gmail.com> <43E0F734.1090202@gmail.com> In-Reply-To: <43E0F734.1090202@gmail.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Manjula G Kutty wrote: > Afkham Azeez wrote: > >> Hi Folks, >> >> I have my derby.properties file in $MY_PROJECT/conf directory. This is >> the directory pointed to by the derby.system.home System property. But >> no my database is getting created under $MY_PROJECT/conf e.g. as >> $MY_PROJECT/conf/DATABASE. >> >> I need my database to be created as $MY_PROJECT/DATABASE. Is there a >> property I can specify in the derby.properties file which will specify >> the physical location of the Database? This is a good candidate for a Derby FAQ. Database names in Derby are more than a single word, they are URL like in that they can include the URL path separator character forward slash '/'. A database name is either relative or absolute. An absolute path corresponds to an absolute path on your file system: jdbc:derby:/home/fred/databases/projects/cdcollection top level folder for the database is /home/fred/databases/projects/cdcollection jdbc:derby:d:/home/2006/accounts top level folder for the database is d:\home\2006\accounts A relative path is relative to the value of the system property derby.system.home if it is set, otherwise relative the current working directory of the java virtual machine. All these examples are different ways to connect to the cdcollection database described above, examples on windows would be similar, including use of the forward slash. derby.system.home=/home/fred/databases jdbc:derby:projects/cdcollection derby.system.home=/home/fred/databases/projects jdbc:derby:cdcollection current working directory = /home/fred jdbc:derby:databases/projects/cdcollection current working directory = /home/fred/databases/projects jdbc:derby:cdcollection HTH, Dan.