取出当前会话、指定会话的详细信息

--取出当前会话的详细信息

select distinct sess.sid     db_sid,
                sess.serial# db_serial#,
                process.pid  db_process_id,
                process.spid os_process_id,
                sess.program
  from v$mystat stat, v$session sess, v$process process
 where stat.sid = sess.sid
   and sess.paddr = process.addr;

 

--取出指定会话的详细信息

select distinct  sess.sid     db_sid,
       sess.serial# db_serial#,
       process.pid     db_process_id,
       process.spid    os_process_id,
       sess.program
  from v$process process, v$session sess
 where sess.paddr = process.ADDR
   and sess.sid = &sid;




  

posted @ 2017-05-16 20:24  Oracle-fans  阅读(348)  评论(0编辑  收藏  举报