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: Is it possible to retrieve the IP address of a Java Client ?

Re: Is it possible to retrieve the IP address of a Java Client ?

From: Laura <f.marchioni_at_pride.it>
Date: Tue, 19 Jun 2007 04:17:24 -0700
Message-ID: <1182251844.651612.108400@q75g2000hsh.googlegroups.com>


On 19 Giu, 13:04, Carlos <miotromailcar..._at_netscape.net> wrote:
> On 19 jun, 12:16, Laura <f.marchi..._at_pride.it> wrote:
>
> > Dear all,
> > I have a Servlet Java which invokes a Stored Procedure.
> > Inside the stored procedure I need to retrieve the IP address or
> > machine name of the client (the servlet).
> > Unfortunately I cannot change the Stored Procedure by adding one more
> > parameter (the client IP).
>
> > Is there any function which I can use to retrieve the IP address of
> > the servlet ?
>
> > Note: the Servlet runs on a different machine then the
> > Database.....
>
> > Thanks
> > Laura
>
> Not sure about what you are after, but SYS_CONTEXT function (HOST,
> IP_ADDRESS...) may help you.
>
> HTH
>
> Cheers.
>
> Carlos.

Thanks for your reply........yes I have found "SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM dual" returns the IP address of the machine that invokes the stored procedure.....BUT.....it returns the application server address where the servlet it's deployed......(the servlet collects the Oracle connection from the connection pool).

Alas I'm afraid it's impossible to retrieve the address of the remote client which connects to the Servlet from inside the Stored Procedure......... :-(

This information is available only in the Java environment and not in the Stored Procedure...... Received on Tue Jun 19 2007 - 06:17:24 CDT

Original text of this message

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