db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim McNamara <thirdshiftco...@yahoo.com>
Subject Re: connection url not working
Date Mon, 14 Jul 2008 02:07:18 GMT
Hi Byran-
i think i am starting to piece this together a little bit.derby has a system directory specified
by derby.system.homeas i put a connection url jdbc:derby://localhost:1527/go/to/the/moon;create=true;it
creates that path in my system directory and moon will be the dbcontaining seg0,tmp,log,service.propertiesso
that is where my storage mysteriously is kept.but what i dont understand is if i send go/to/the/moon
path and dbto trash in konqueror file manager, that squirrel sql still connects as if it was
there residing in system directory.so is there another place it resides? why when you send
stuff to the trashcan you still connect and even see tables and run sql?it is crazy.thanks,jim---
On Sun, 7/13/08, Bryan Pendleton <bpendleton@amberpoint.com> wrote:
From: Bryan Pendleton <bpendleton@amberpoint.com>
Subject: Re: connection url not working
To: "Derby Discussion" <derby-user@db.apache.org>
Date: Sunday, July 13, 2008, 5:17 PM

> if i try to move to a different location with the datafiles:
> jdbc:derby://localhost:1527/home/thirdshift/b1/JADE_DB

Simply changing the URL won't move the data; the data still
resides in the database at its original location.

To move the data, you could:
  - backup and restore the database
  - export the data from the old DB, then import it to the new one
  - write a program of your own to read the data out of the old
    DB and write it to the new DB

The database can be located at any location, and you can certainly
set up your program so that your users can choose a different
location than you have used.

However, once a location is chosen for the database, you'll
need to consistently use that same location in the connection URL
in order to successfully access that database.

So, make your connection URL configurable, but once your users
have selected a particular location, set the URL to point to
that location and use it from then on.



View raw message