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: Session Ip Address

Re: Session Ip Address

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 04 Jan 2007 09:01:54 -0800
Message-ID: <1167930113.861103@bubbleator.drizzle.com>


Michel Cadot wrote:
> "Emre" <emre_at_emre.com> a écrit dans le message de news: Xns98AE940DFD6A7emreemrecom_at_fe06.highwinds-media.phx...
> | Hii All
> | How can I see client's ip address from v$session ? or is there another view to see
> | client's ip address
>
> select sid, machine, utl_inaddr.get_host_address(machine) ip
> from v$session
> where type='USER' and username is not null
> /
>
> Regards
> Michel Cadot

Unfortunately, on Windows machines you are likely to see this:

SQL> select sid, machine, utl_inaddr.get_host_address(machine) ip

   2 from v$session
   3 where type='USER' and username is not null    4 /
select sid, machine, utl_inaddr.get_host_address(machine) ip

                      *

ERROR at line 1:
ORA-29257: host WORKGROUP\PERRITO2 unknown
ORA-06512: at "SYS.UTL_INADDR", line 19
ORA-06512: at "SYS.UTL_INADDR", line 40
ORA-06512: at line 1


SQL> select sid, machine

   2 from v$session
   3 where type='USER' and username is not null;

        SID MACHINE

---------- ------------------------------------------------------
        158 WORKGROUP\PERRITO2

SQL> select utl_inaddr.get_host_address(machine)

   2 from dual;
select utl_inaddr.get_host_address(machine)

                                    *

ERROR at line 1:
ORA-00904: "MACHINE": invalid identifier

SQL>

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Jan 04 2007 - 11:01:54 CST

Original text of this message

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