Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Linking IP address to Oracle process
> Peter Yates <PeterYates_at_access.net.au> wrote:
> >Is there any way either in Oracle or Unix that an IP address can be
> >matched to an Oracle process. We are running 7.3 with parallel query and
> >whenever we have a problem at the client end , we would like to be able
> >to match the offending IP address with its Oracle process?
> >
> >thanx
> >peter
Peter
We have had a similar problem - using SQL*Net to connect to Oracle, how can we tell which session belongs to which user (given that our app is designed to connect to Oracle with a common Oracle userid).
I assume you can relate the Oracle session to the unix process ID - this information is available in v$session (sid = Oracle session id, spid = Unix process id). The unix process id corresponds to the SQL*Net connection process created. We track the IP address that corresponds to that SQL*Net connection using a utility called lsof (we have HP-UX v10.x but lsof seems to be a 'standard' utility available on many systems).
How to use it - lsof gives a listing of info relating to all files for a process, including special files (of which the TCP connection is considered a special file).
The command:
lsof | grep <process_id> | grep TCP
should give you the specific information you are after. See example below:
lsof | grep 6908 | grep TCP
oracleFCP 6908 oracle 26u inet 0x00f4de00 0t2119 TCP hp_g50.flexcab.itg.telecom.com.au:1521->172.17.7.117:102
Hope this can be of help to you
Matt Received on Thu Oct 31 1996 - 00:00:00 CST