select * from v$sql
where address in
(select sql_address from v$session
    where sid in 
    (select sid from v$session
        where paddr in(
        select addr from v$process where spid = 12831928) )    
根据Linux下的top命令查看spid
原文:https://www.cnblogs.com/archer-wen/p/10035950.html