Wednesday, January 1, 2025

Query to get the Running History of Concurrent Programs in Oracle APPS R12

SELECT fcr.oracle_session_id o_sid
      ,ROUND (( ( NVL (fcr.actual_completion_date, SYSDATE)- fcr.actual_start_date)* 60* 24),2) runtime_min
      ,fcr.request_id request_id
      ,fcr.requested_by requested_by
      ,fu.user_name user_name
      ,fr.responsibility_name
      ,fcr.concurrent_program_id concurrent_program_id
      ,fcp.user_concurrent_program_name concurrent_program_name
      ,TO_CHAR (fcr.actual_start_date, 'DD-MON-YYYY HH24:MI:SS') start_time
      ,DECODE (fcr.status_code ,'C', 'C:Completed','G', 'G:Warning','E', 'E:Error','Q','Q:Queued',fcr.status_code) status
      ,TO_CHAR (fcr.actual_completion_date, 'DD-MON-YYYY HH24:MI:SS') end_time
      ,ROUND (( ( NVL (fcr.actual_completion_date, SYSDATE)- fcr.actual_start_date)* 60* 60* 24),2) run_time_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 fcp.user_concurrent_program_name LIKE 'XX Concurrent Program Name%'
    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 fu.user_id = fcr.requested_by
   --AND fcr.request_id = 1234567890
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...