SELECT a.address,
s.status,
s.username,
s.osuser,
a.sql_text,
s.SID
FROM v$sql a,
v$session s
WHERE s.sql_address = a.address
AND s.SID IN
(SELECT d.SID
FROM apps.fnd_concurrent_requests a,
apps.fnd_concurrent_processes b,
v$process c,
v$session d
--v$sql e
WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND d.paddr = c.addr
--AND d.sql_address = e.address
AND a.request_id = 10803707 (provide the actual request id)
and a.PHASE_CODE = 'R'
)
s.status,
s.username,
s.osuser,
a.sql_text,
s.SID
FROM v$sql a,
v$session s
WHERE s.sql_address = a.address
AND s.SID IN
(SELECT d.SID
FROM apps.fnd_concurrent_requests a,
apps.fnd_concurrent_processes b,
v$process c,
v$session d
--v$sql e
WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND d.paddr = c.addr
--AND d.sql_address = e.address
AND a.request_id = 10803707 (provide the actual request id)
and a.PHASE_CODE = 'R'
)