--下面的SQL可以根据Request ID找到对应的Session信息:
select *
from v$session
where paddr in
(select addr
from v$process
where spid =
(select b.oracle_process_id
from apps.fnd_concurrent_requests b
where b.request_id = &req_number))
--或者进一步找到正在运行的SQL:
select sql_text
from v$sqltext_with_newlines
where hash_value in
(select SQL_HASH_VALUE
from v$session
where paddr in
(select addr
from v$process
where spid =
(select b.oracle_process_id
from apps.fnd_concurrent_requests b
where b.request_id = &req_number)))
order by piece;
--通过request id 和 sql id找到相关脚本:
SELECT ses.sid,
ses.serial# ,
Ses.sql_id
FROM v$session ses,
v$process pro
WHERE ses.paddr = pro.addr
AND pro.spid IN (SELECT oracle_process_id
FROM fnd_concurrent_requests
WHERE request_id = <request_id>);
select sql_text from v$sqltext where sql_id=‘0kkhhb2w93cx0‘ order by piece
原文地址:https://www.cnblogs.com/quanweiru/p/9128161.html