How to list active / open connections in Oracle?

后端 未结 9 781
孤街浪徒
孤街浪徒 2020-11-30 17:25

Is there any hidden table, system variable or something to show active connections in a given moment?

9条回答
  •  独厮守ぢ
    2020-11-30 18:22

    For a more complete answer see: http://dbaforums.org/oracle/index.php?showtopic=16834

    select
           substr(a.spid,1,9) pid,
           substr(b.sid,1,5) sid,
           substr(b.serial#,1,5) ser#,
           substr(b.machine,1,6) box,
           substr(b.username,1,10) username,
    --       b.server,
           substr(b.osuser,1,8) os_user,
           substr(b.program,1,30) program
    from v$session b, v$process a
    where
    b.paddr = a.addr
    and type='USER'
    order by spid; 
    

提交回复
热议问题