Tag: client

How to get current session id, process id, client process id?

SQL> select b.sid, b.serial#, a.spid processid, b.process clientpid from v$process a, v$session b where a.addr = b.paddr and b.audsid = userenv('sessionid'); SID SERIAL# PROCESSID CLIENTPID ---------- ---------- --------- --------- 43 52612 420734 5852:5460 V$SESSION.SID and V$SESSION.SERIAL# are database process id V$PROCESS.SPID - Shadow process id on the database server V$SESSION.PROCESS - Client process id, on … Continue reading How to get current session id, process id, client process id?

How to get client process id and oracle shadow process id in dedicated server?

-- note this will work when not logged in as SYS, as the session id is the same for all background processes SELECT p.spid oracle_dedicated_process, s.process clientpid FROM v$process p, v$session s WHERE p.addr = s.paddr AND s.audsid = userenv('sessionid'); Or for SYS you can use the following SQL> SELECT p.spid oracle_dedicated_process, s.process clientpid FROM … Continue reading How to get client process id and oracle shadow process id in dedicated server?