查询系统进程对应的SQL

select /*+ordered  */
 sql_text,
 spid,
 v$session.program,
 machine,
 process,
 sid,
 v$session.SERIAL#
  from v$process, v$session, v$sql
 where v$sql.address = v$session.sql_address
   and v$sql.hash_value = v$session.sql_hash_value
   and v$session.paddr = v$process.addr
   and v$process.spid = &spid

posted on 2011-11-18 22:50  czjie  阅读(302)  评论(0编辑  收藏  举报

导航