--EBS单实例上所有正在运行的并发请求以及请求目前的状态
---一个实例上运行的所有并发请求的总结和他们目前的状态以及等待状态
select w.seconds_in_wait "Secondswait",
w.event "waitEvent",
w.p1 || chr(10) || w.p2 || chr(10) || w.p3 "Session Wait",
p.spid || chr(10) || s.process "ServerClient",
s.sid || chr(10) || s.serial# || chr(10) || s.sql_hash_value "SidSerialSQLHash",
u.user_name || chr(10) || PHASE_CODE || ' ' || STATUS_CODE ||
chr(10) || s.status "DBPhaseStatusCODEUser",
Request_id || chr(10) || priority_request_id || chr(10) ||
Parent_request_id "Request_id",
concurrent_program_name,
user_concurrent_program_name,
requested_start_Date || chr(10) ||
round((sysdate - requested_start_date) * 1440, 2) || 'M' "RequestStartDate",
ARGUMENT_TEXT,
CONCURRENT_QUEUE_ID,
QUEUE_DESCRIPTION
FROM FND_CONCURRENT_WORKER_REQUESTS,
fnd_user u,
gv$session s,
gv$process p,
gv$session_wait w
WHERE (Phase_Code = 'R')
and hold_flag != 'Y'
and Requested_Start_Date <= SYSDATE
AND ('' IS NULL OR
('' = 'B' AND PHASE_CODE = 'R' AND STATUS_CODE IN ('I', 'Q')))
and '1' in (0, 1, 4)
and requested_by = u.user_id
and s.paddr = p.addr
and s.sid = w.sid
and oracle_process_id = p.spid
and oracle_session_id = s.audsid
order by requested_start_date;