Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the Java process PID on Linux, that generated an Oracle session

Alex.V-OracleOct 24 2007 — edited Oct 24 2007
Hello ,

I have some scheduled Java programs that connects to an Oracle database and makes some DML there. All on a Linux mashine.

Having an Oracle session and process, I want to find out which was the Linux PID of the Java process that genereted the Oracle session. By interogating the dynamic performance views or some dictionary views if possible.

From $session s and v$process (see the query bellow), I can only find out the spid, which is the PID of the Oracle proccess on the Linux. I need the PID of the Java process, if possible.
select s.username, s.osuser, s.sid, p.spid , s.sql_id
from v$session s,v$process p
where s.paddr = p.addr
and s.username ='....';

Thank you.

Dragos
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2007
Added on Oct 24 2007
3 comments
2,961 views