Oracle EBS R12 - SQL to find session ID of the running request from request ID
根据请求ID查找正在运行的请求的Session ID
VER:
Application: EBS R12.0.6
Database: Oracle 10gR2
SQL:
SELECT fcr.request_id
,fcr.actual_start_date
,fcr.actual_completion_date
,SYSDATE
,farv.phase
,farv.status
,vs.sid
,vs.serial#
,vs.status sess_status
,fcp.logfile_name mgr_log
,fcr.logfile_name req_log
,fcr.outfile_name req_out
FROM fnd_concurrent_requests fcr
,fnd_concurrent_processes fcp
,v$process vp
,v$session vs
,fnd_amp_requests_v farv
WHERE fcr.controlling_manager = fcp.concurrent_process_id
AND fcr.oracle_process_id = vp.spid
AND vp.addr = vs.paddr
AND fcr.request_id = farv.request_id
AND fcr.phase_code = 'R'
-- AND fcr.request_id in ()
;
REF:
Concurrent Processing - How to Find Database Session & Process Associated with a Concurrent Program Which is Currently Running. (Doc ID 735119.1)
与锁相关的引用
What's blocking my lock?
http://blog.csdn.net/t0nsha/article/details/7365248
select l1.sid, ' IS BLOCKING ', l2.sid
from v$lock l1, v$lock l2
where l1.block =1 and l2.request > 0
and l1.id1=l2.id1
and l1.id2=l2.id2 ;