col oracle_process_id format a5 head OSPID
col inst_name format a10
col sql_text format a30
col outfile_tmp format a30
col logfile_tmp format a30
select /*+ ordered */
fcr.request_id,
fcp.user_concurrent_program_name
, round(24*60*(
sysdate - actual_start_date )) elapsed
,
fcr.oracle_process_id
, sess.sid
, sess.serial#
, inst.inst_name
, sa.SQL_ID
from
apps.fnd_concurrent_requests fcr
,
apps.fnd_concurrent_programs_tl fcp
, apps.fnd_concurrent_processes
cp
, apps.fnd_user fu
, gv$process pro
, gv$session sess
, gv$sqlarea sa
,
sys.v_$active_instances inst
where
fcp.concurrent_program_id = fcr.concurrent_program_id
and
fcp.application_id = fcr.program_application_id
and
fcr.controlling_manager = cp.concurrent_process_id
and fcr.requested_by
= fu.user_id (+)
and
fcr.oracle_process_id = pro.spid (+)
and pro.addr =
sess.paddr (+)
and sess.sql_address
= sa.address (+)
and sess.sql_hash_value
= sa.hash_value (+)
and sess.inst_id =
inst.inst_number (+)
and
request_id='&req_id';