取出当前会话的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;