check sql session detail in oracle database

Check sql session detail in oracle database

 

SET LINESIZE 190 
COLUMN spid FORMAT A10
COLUMN username FORMAT A15
COLUMN program FORMAT A65
SELECT s.inst_id,
s.sid,s.serial#,
p.spid,
s.username,
s.program
 FROM gv$session s
 JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';

Leave a Reply

Your email address will not be published. Required fields are marked *