Re: Getting the IP address of a client over the web

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 04 Jun 2002 15:24:31 GMT
Message-ID: <3CFCDBA9.28ACA7EF_at_exesolutions.com>


Ryan Gaffuri wrote:

> Posted this on the oracle.server board. Probably the wrong place. I
> think Im looking for a forms level way to do this.
>
> I need to be able to get the IP address of a web client who is
> accessing our web forms(we are using APACHE and not IAS) and have it
> stored in a variable in some way for later use.
>
> SYS_CONTEXT does not work with the web. Just gives me the IP address
> of the server. I would greatly prefer to do this in PL/SQL and not
> with a Javabean(since I dont really know Java).
>
> Also, we have more than one user logging in with the same account. I
> have no control over this and no way to change it.
>
> Thanks,
>
> Ryan

I am going to make one more attempt to help you and then I am washing my hands of the whole thing. It is extremely frustrating to give someone the answer to their problem several times and have them ignore it.

  • the procedure CREATE OR REPLACE PROCEDURE logproc IS

addr VARCHAR2(20);

BEGIN
   IF (ora_sysevent = 'LOGON') THEN

      addr := ora_client_ip_address;
   END IF;

  • then get the session information from v_$session and insert the lot into a table.
  • You can later query this table to get the IP Address whenever you need it. END logproc; /
    • the trigger that executes it CREATE OR REPLACE TRIGGER logintrig AFTER logon ON DATABASE CALL logproc /

Daniel Morgan Received on Tue Jun 04 2002 - 17:24:31 CEST

Original text of this message