In today’s article we will learn How to See Active Session in Oracle Database.
With the help of the code block below, we can see the Active Session.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | SELECT NVL(s.username, '(oracle)') AS username ,s.osuser ,s.sid ,s.serial# ,p.spid ,s.lockwait ,s.STATUS ,s.machine ,s.program ,TO_CHAR(s.logon_Time, 'DD-MON-YYYY HH24:MI:SS') AS logon_time ,s.last_call_et AS last_call_et_secs ,s.module ,s.action ,s.client_info ,s.client_identifier FROM v$session s ,v$process p WHERE s.paddr = p.addr AND s.STATUS = 'ACTIVE' ORDER BY s.username ,s.osuser; |