Find out all currenct connections in for Oracle SQL

来源:互联网 发布:java中inter() 编辑:程序博客网 时间:2024/06/03 21:17

Select from v$session and v$process

select
       substr(a.spid,1,9) pid,
       substr(b.sid,1,5) sid,
       substr(b.serial#,1,5) ser#,
       substr(b.machine,1,6) machine,
       substr(b.username,1,10) username,
       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;


原创粉丝点击