db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering" <da...@vancouvering.com>
Subject Re: SYSCS_GET_DATABASE_PROPERTY not working?
Date Fri, 14 Sep 2007 05:32:39 GMT
Hey, I could even add this myself.  One forgets sometimes that this is
open source and that one is a committer :)

David

On 9/13/07, David Van Couvering <david@vancouvering.com> wrote:
> OK, sounds good, I guess you could do that.  But I do believe that it
> would be Very Nice if Derby provided this feature for your - for
> instance, when you do 'java -jar derbyrun.jar server sysinfo' it would
> print out, among all the other things, the value of derby.system.home.
>  Right now it doesn't, even if you explicitly set it when you start
> the server.
>
> Better yet, it should say "default database directory" and print out
> wherever that is, whether it is derby.system.home or user.dir.
>
> I'll log a feature request.
>
> David
>
> On 9/13/07, Knut Anders Hatlen <Knut.Hatlen@sun.com> wrote:
> > David Van Couvering <david@vancouvering.com> writes:
> >
> > > On 9/12/07, Øystein Grøvlen <Oystein.Grovlen@sun.com> wrote:
> > >> David Van Couvering wrote:
> > >>  > OK, fair enough.  So, how *do* I find out what derby.system.home
is
> > >> set to??
> > >>  >
> > >>
> > >> I would think it is the same way as with any Java System property
> > >> (Kathey implicity told you that):
> > >>
> > >>      System.getProperty("derby.system.home");
> > >
> > > Yes, I know that.  But if I'm running the network server, how am I
> > > supposed to find out what the network server thinks is
> > > derby.system.home?  Especially if I'm interacting with Derby from a
> > > tool like NetBeans.  It could very well be that the developer is using
> > > JRuby or even PHP with ODBC, and is not even a Java programmer.
> >
> > If your network server has the necessary permissions to read
> > derby.system.home and user.dir (in case derby.system.home is null), you
> > could do something like this:
> >
> > ij version 10.3
> > ij> connect 'jdbc:derby://localhost/mydb;create=true';
> > ij> create function getSystemProperty(name varchar(128)) returns varchar(128)
language java external name 'java.lang.System.getProperty' parameter style java no sql;
> > 0 rows inserted/updated/deleted
> > ij> values getSystemProperty('derby.system.home');
> > 1
> > --------------------------------------------------------------------------------------------------------------------------------
> > NULL
> >
> > 1 row selected
> > ij> values getSystemProperty('user.dir');
> > 1
> > --------------------------------------------------------------------------------------------------------------------------------
> > /tmp
> >
> > 1 row selected
> >
> >
> > --
> > Knut Anders
> >
>

Mime
View raw message