Vous êtes sur la page 1sur 1

1> findout your current session id:

select sys_context('userenv','sessionid') Session_ID from dual;

2> 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$proce
ss a, v$session b
where a.addr = b.paddr
and b.audsid = userenv(sessionid);
- -
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 windows it is : separated the first # is t
he process id on the client and 2nd one is the thread id.