Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Session Ip Address
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
*
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)
*
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.orgReceived on Thu Jan 04 2007 - 11:01:54 CST