Query para pesquisa de Concurrents no EBS
Olá pessoal !
Me pediram uma query que trouxesse os detalhes dos concurrents em execução e programados no EBS. Aproveitei e montei algo um pouco mais completo e vou compartilhar com vocês. 🙂
SELECT
TO_CHAR
(
fcr.requested_start_date
,'DD/MM/RRRR hh24:mi:ss'
) requested_start_date
,fcr.request_id
,fcr.concurrent_program_id
,fcr.requested_by
,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'
,fcr.status_code
) "status code"
,DECODE
(
fcr.phase_code
,'C','Completed','I','Inactive','P','Pending','R','Running'
,fcr.phase_code
) "phase code"
,fcp.user_concurrent_program_name
,fre.responsibility_name
,fcr.request_date
,fcr.argument_text
,fcr.logfile_name
,fcr.outfile_name
,fcr.output_file_type
,fus.user_name
FROM fnd_concurrent_requests fcr
,fnd_concurrent_programs_tl fcp
,fnd_responsibility_tl fre
,fnd_user fus
WHERE fcr.concurrent_program_id = fcp.concurrent_program_id
AND fcr.responsibility_id = fre.responsibility_id
AND fcr.requested_by = fus.user_id
AND TRUNC(fcr.requested_start_date) = TRUNC(SYSDATE)
-- AND user_name = '<USER>' - POR OWNER DO CONCURRENT
-- AND status_code IN ('S','T','U','W','X') -- ERRO, PARADA OU FALHA
-- AND status_code IN ('H') -- Concurrent parado
-- AND fcr.phase_code = 'R'-- EXECUTANDO
ORDER BY fcr.requested_start_date DESC;
Espero que essa Query seja útil a outros ! 🙂
Um grande abraço