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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: IP Address of a PC

RE: IP Address of a PC

From: Gait, Christopher <cgait_at_condor.nrl.navy.mil>
Date: Sun, 2 Jul 2000 11:01:18 -0400
Message-Id: <10546.111071@fatcity.com>


In Oracle8i this context function is available:

SELECT
  SYS_CONTEXT('USERENV', 'IP_ADDRESS')
FROM
  Dual;

and can easily be placed in PL/SQL. Here is an example modified from Feuerstein's Guide to Oracle 8i Features:

DECLARE
  PROCEDURE showenv (str in VARCHAR2) IS   BEGIN

  		DBMS_OUTPUT.Put_Line(
					   SYS_CONTEXT('USERENV', str)
					  );  				

  END;
BEGIN
        showenv('IP_ADDRESS');
END; Regards,
Chris Gait

> -----Original Message-----
> From: Alroy Mascrenghe [SMTP:mark_alroy_at_yahoo.co.uk]
> Sent: Sunday, July 02, 2000 12:24 PM
> To: Multiple recipients of list ORACLE-L
> Subject: IP Address of a PC
>
> Hi All
>
> Any easy way of getting the PC's IP address to a PL
> procedure?
>
> TIA
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
Received on Sun Jul 02 2000 - 10:01:18 CDT

Original text of this message

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