Oracle ERP Interface堵住--Request Running too long time,查找Request执行的Sql
Request Running too long time
堵住了INV Manager
导致INV Interface Pending 很多笔资料
Review 发现Request 实际执行SQL 为空,Request Idle(SQL 如下,之前weiheng提供,很好用)
通过Cancel Request 后,状况恢复正常
具体Sql:
--------------------------------
-- 由request id 查 os procesee id
select os_process_id from apps.fnd_concurrent_requests where request_id='&Request_id';
--由os process id 查 sid
select s.INST_ID,s.PROCESS,s.SID,p.SPID,s.LAST_CALL_ET,s.MACHINE,s.SERIAL#,s.OSUSER,s.USERNAME,s.PADDR
from gv$session s,gv$process p
where s.PROCESS='&Process' and s.PADDR=p.ADDR;
--由SID查目前wait event
select s.SID,so.CONSISTENT_GETS,s.LAST_CALL_ET,sw.EVENT,sw.*
from v$session s,v$sess_io so,v$session_wait sw
where s.SID = '&SID'
and s.SID=so.SID and s.SID=sw.SID;
--由SID查目前執行sql
select s.SID "db session",sq.sql_text "SQL_COMMAND"
from gv$process p,gv$session s,v$sqltext sq
where
p.ADDR = s.PADDR(+) and s.sql_address=sq.address(+) and s.sql_hash_value=sq.hash_value(+) and
s.SID = '&SID'
order by sq.PIECE;
---------------------------