The Linux open source operating system, or Linux OS, is a freely distributable, cross-platform operating system based on Unix

Thursday, June 13, 2019

Concurrent Request Statistics



--- Concurrent Request ran in 24 Hours
SELECT fcr.request_id "Request ID",
       fcp.user_concurrent_program_name "Program",
      -- fcr.argument_text " Parameters",
       fu.user_name "Username",
       fr.responsibility_name "Responsbility",
       fcr.actual_start_date "Starting Time",
       fcr.actual_completion_date "Ending Time",
       TRUNC((fcr.actual_completion_date - fcr.actual_start_date) * 1440, 2) "Hours Minutes"
  FROM fnd_concurrent_requests    fcr,
       fnd_concurrent_programs_vl fcp,
       fnd_responsibility_vl      fr,
       fnd_user                   fu
 WHERE actual_start_date LIKE SYSDATE-1
   AND fu.user_id = fcr.requested_by
      --AND (SYSDATE - actual_start_date) * 24 > 1
   AND status_code = 'C'
   AND phase_code = 'C'
      --AND fu.user_name='MJUBARA'
   and fcr.CONCURRENT_PROGRAM_ID = fcp.CONCURRENT_PROGRAM_ID
   and fu.user_id = fcr.requested_by
   and fr.responsibility_id = fcr.responsibility_id
 order by "Hours Minutes" DESC


 --- CONCURRENT REQUESTS COMPLETED WITH ERROR
 SELECT requestor, a.request_id request_id
, SUBSTR(a.user_concurrent_program_name,1,50) name
, TO_CHAR(a.actual_start_date,'DD/MON/YYYY HH:MI') start_time
, TO_CHAR(a.actual_completion_date,'DD/MON/YYYY HH:MI') end_time
, DECODE(a.phase_code, 'R'
,'Running', 'P'
,'Inactive', 'C'
,'Completed', a.phase_code) phase_code
, DECODE(a.status_code, 'E'
,'Error', 'C'
,'Normal', 'X'
,'Terminated', 'Q'
,'On Hold', 'D'
,'Cancelled', 'G'
,'Warning', 'R'
,'Normal', 'W'
,'Paused', a.status_code) status_code
, argument_text Parameters
, completion_text Completion_Error
FROM apps.fnd_conc_req_summary_v a
WHERE TRUNC(actual_completion_date) >= TRUNC(SYSDATE -1)
AND a.status_code IN ('E')
ORDER BY actual_start_date


---Concurrent Requests Completed With Warning
SELECT requestor, a.request_id request_id
, SUBSTR(a.user_concurrent_program_name,1,50) name
, TO_CHAR(a.actual_start_date,'DD/MON/YYYY HH:MI') start_time
, TO_CHAR(a.actual_completion_date,'DD/MON/YYYY HH:MI') end_time
, DECODE(a.phase_code, 'R'
,'Running', 'P'
,'Inactive', 'C'
,'Completed', a.phase_code) phase_code
, DECODE(a.status_code, 'E'
,'Error', 'C'
,'Normal', 'X'
,'Terminated', 'Q'
,'On Hold', 'D'
,'Cancelled', 'G'
,'Warning', 'R'
,'Normal', 'W'
,'Paused', a.status_code) status_code
, argument_text Parameters
, completion_text Completion_Error
FROM apps.fnd_conc_req_summary_v a
WHERE TRUNC(actual_completion_date) >= TRUNC(SYSDATE -1)
AND a.status_code IN ('G')
ORDER BY actual_start_date



---Concurrent Statistics 24 Hours
SELECT count (fcr.request_id) as "Request Count",
       fcp.user_concurrent_program_name "Program",
       fu.user_name "Username",
       TRUNC((fcr.actual_completion_date - fcr.actual_start_date) * 1440, 2) "Minutes"
       FROM fnd_concurrent_requests    fcr,
       fnd_concurrent_programs_vl fcp,
       fnd_user                   fu
 WHERE actual_start_date LIKE SYSDATE-1
   AND fu.user_id = fcr.requested_by
      --AND (SYSDATE - actual_start_date) * 24 > 1
   AND status_code = 'C'
   AND phase_code = 'C'
   and fcr.CONCURRENT_PROGRAM_ID = fcp.CONCURRENT_PROGRAM_ID
   and fu.user_id = fcr.requested_by
   group  by fcp.user_concurrent_program_name, fu.user_name ,fcr.actual_completion_date,fcr.actual_start_date

0 comments :

Post a Comment

Note: Only a member of this blog may post a comment.