剛好遇到Lock的類型是Concurrent Request,因為知道Session ID(SID),
想由Session ID找出Concurrent Request,可以執行下列的SQL
select vs.sid "Session_ID"
,vs.serial# "Session_Serial#"
,vp.spid "OS_PID"
,fcp.user_concurrent_program_name "Concurrent Name"
,fcr.request_id "Concurrent ID"
,fcr.actual_start_date "Start Time"
,fcr.actual_completion_date "Finish Time"
,(fcr.actual_completion_date-fcr.actual_start_date)*24*60*60 "Expense Time(second)"
,decode(fcr.phase_code,'R','Running','C','Completed','P','Pending','I','Inactive') "Request Status"
,decode(fcr.status_code,'A','Waiting','B','Resuming','C','Normal','D','Cancelled','E','Error',
'F','Scheduled','G','Warning','H','On Hold','I','Normal','M','No Manager',
'Q','Standby','R','Normal','S','Suspended','T','Terminating','U','Disabled',
'W','Paused','X','Terminated','Z','Waiting') "Request Phase"
from v$session vs
,v$process vp
,fnd_concurrent_requests fcr
,fnd_concurrent_programs_tl fcp
where vs.paddr=vp.addr
and vs.process=fcr.os_process_id
and fcr.concurrent_program_id=fcp.concurrent_program_id
and fcr.phase_code='R' --running
and vs.sid = &SID ; --Session SID