取出当前会话的sid、process_id.sql

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;

 

 

posted @ 2017-05-05 09:13  Oracle-fans  阅读(895)  评论(0编辑  收藏  举报