通過sid找出對應系統的pid
SQL> select spid from v$process where addr in (select paddr from v$session where sid=1323);
SPID
------------
3269212
通過spid 找到sid
select sid from v$session where paddr in (select addr from v$process where spid=29698);
通過sid找出執行的sql語句
sql>select sql_address,sql_hash_value from v$session where sid=20