Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing db name in java stored procedure

Re: Accessing db name in java stored procedure

From: Tom Barnes <barnest_at_san.rr.com>
Date: 3 Dec 2002 11:59:18 -0800
Message-ID: <ae6b6116.0212031159.30cb7ee4@posting.google.com>


KevJohnP <nospam_at_nowhere.com> wrote in message news:<3DEC277D.3070201_at_nowhere.com>...
> One possible way _would_ have been to use java (java.net) to determine
> the hostname;
>
> String h = InetAddress.getLocalHost().getHostName();
>
> Whilst this works fine running from a regular JVM, from Oracle's JVM it
> always returns "localhost".

On my systems InetAddress.getLocalHost().toString(); returns the correct hostname.

Oracle8i Enterprise Edition 8.1.6.1 on Solaris 2.7 Received on Tue Dec 03 2002 - 13:59:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US