How to get the Java process PID on Linux, that generated an Oracle session
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