Wednesday, January 1, 2025

Query to get Long Running Concurrent Programs in R12

SELECT fcr.oracle_session_id
      ,fcr.request_id rqst_id
      ,fcr.requested_by rqst_by
      ,fu.user_name
      ,fr.responsibility_name
      ,fcr.concurrent_program_id cp_id
      ,fcp.user_concurrent_program_name cp_name
      ,TO_CHAR (fcr.actual_start_date, 'DD-MON-YYYY HH24:MI:SS') act_start_datetime
      ,DECODE (fcr.status_code, 'R', 'R:Running', fcr.status_code) status
      ,ROUND (((SYSDATE - fcr.actual_start_date) * 60 * 24), 2) runtime_in_min
      ,ROUND (((SYSDATE - fcr.actual_start_date) * 60 * 60 * 24), 2)runtime_in_sec
      ,fcr.oracle_process_id "oracle_pid/SPID"
      ,fcr.os_process_id os_pid
      ,fcr.argument_text
      ,fcr.outfile_name
      ,fcr.logfile_name
      ,fcr.enable_trace
  FROM fnd_concurrent_requests fcr
      ,fnd_user fu
      ,fnd_responsibility_tl fr
      ,fnd_concurrent_programs_tl fcp
 WHERE fcr.status_code = 'R'
   AND fu.user_id = fcr.requested_by
   AND fr.responsibility_id = fcr.responsibility_id
   AND fcr.concurrent_program_id = fcp.concurrent_program_id
   AND fcr.program_application_id = fcp.application_id
   AND ROUND (((SYSDATE - fcr.actual_start_date) * 60 * 24), 2) > 60
   ORDER BY fcr.concurrent_program_id
           ,request_id DESC

No comments:

Post a Comment

Query to get Parent and Child Accounts in Oracle APPS R12

SELECT ffv1.flex_value parent_account       ,ffvt1.description parent_account_desc   ,ffv2.flex_value child_account   ,ffvt2.description...