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: IP of the current instance/DB

Re: IP of the current instance/DB

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 20 Nov 2004 15:27:03 -0800
Message-ID: <92eeeff0.0411201527.39dd5171@posting.google.com>


robert <rchin_at_nietspampanix.com> wrote in message news:<cnljup$ifu$1_at_reader1.panix.com>...
> Sybrand Bakker wrote:
> >
> > You read the manual under SYS_CONTEXT
> > and/or check out the v$instance view.
> > I'm not sure why you want to know this, in a well-configured
> > environment you definitely don't have instances and databases with
> > identical names living of different hosts. I have the strange feeling
> > your situation doesn't adhere to that standard.
>
> no, no instance + DB all on one box, just being anal when it come to
> references to "instance" and "database".
>
> SYS_CONTEXT('USERENV','IP_ADDRESS') --> Client IP
> v$instance --> Just host name

select utl_inaddr.get_host_address -- (IP Address) from dual;

select utl_inaddr.get_host_name -- (Host name) from dual;

Note: For this function call to work in 8.1.7.x, you need to have ORACLE_HOME/plsql/jlib/plsql.jar installed in the database.

Regards
/Rauf Received on Sat Nov 20 2004 - 17:27:03 CST

Original text of this message

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