Home » RDBMS Server » Networking and Gateways » client ip adress connected on my database (oracle 9i , solaris)
client ip adress connected on my database [message #304699] Thu, 06 March 2008 04:53 Go to next message
koff10
Messages: 18
Registered: December 2006
Location: france
Junior Member
Hi all,
I'm trying to locate client adress ip connected on my oracle database.
How can I proceed ?
Help please, Thanks
koff10
Re: client ip adress connected on my database [message #304702 is a reply to message #304699 ] Thu, 06 March 2008 05:07 Go to previous messageGo to next message
Michel Cadot
Messages: 17697
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
select sid, machine, UTL_INADDR.get_host_address (machine) 
from v$session 
where type='USER' and username is not null 
order by sid 
/ 

Regards
Michel
Re: client ip adress connected on my database [message #304740 is a reply to message #304702 ] Thu, 06 March 2008 08:02 Go to previous messageGo to next message
koff10
Messages: 18
Registered: December 2006
Location: france
Junior Member
Michel Cadot wrote on Thu, 06 March 2008 12:07
select sid, machine, UTL_INADDR.get_host_address (machine) 
from v$session 
where type='USER' and username is not null 
order by sid 
/ 

Regards
Michel



Hi,
"UTL_INADDR.get_host_address" is ip address of the machine where database is . it not what I want.

I would like to get ip address of client connected in my database.

thanks
Re: client ip adress connected on my database [message #304742 is a reply to message #304740 ] Thu, 06 March 2008 08:06 Go to previous messageGo to next message
Michel Cadot
Messages: 17697
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Try it.

Regards
Michel
Re: client ip address connected on my database [message #309931 is a reply to message #304742 ] Sun, 30 March 2008 02:06 Go to previous messageGo to next message
Mohammad Taj
Messages: 2212
Registered: September 2006
Location: Dubai, UAE
Senior Member

Michal,
Above code is correct but in windows system we almost get below error Smile

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


You should post below code right Smile to fix above error.

select sid, machine,
       UTL_INADDR.get_host_address (substr(machine,instr(machine,'\')+1)) ip from v$session
where type='USER' and username is not null
/


http://orafaq.com/usenet/comp.databases.oracle.server/2007/01/04/0202.htm

Re: client ip address connected on my database [message #309934 is a reply to message #309931 ] Sun, 30 March 2008 02:37 Go to previous messageGo to next message
Michel Cadot
Messages: 17697
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Where is the pleasure if you have nothing to discover and workaround? Smile

Regards
Michel

[Updated on: Sun, 30 March 2008 02:39]

Re: client ip adress connected on my database [message #310368 is a reply to message #304699 ] Tue, 01 April 2008 01:02 Go to previous message
Arju
Messages: 1488
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

You can also see client IP from listener log file.
Previous Topic:CMAN parameters meaning (was: "Would you like to explain more?")
Next Topic:Os authentification on oracle database using MS ACCESS and oracle ODBC
Goto Forum:
  


Current Time: Fri Jul 25 16:53:49 CDT 2008

Total time taken to generate the page: 0.06555 seconds
.:: Forum Home :: Site Home :: Wiki Home :: Contact :: Privacy ::.