December 17, 2021

Find Concurrent Program Run History from backend

Query to find concurrent program run history and status


SELECT f.request_id,
         pt.user_concurrent_program_name
             user_conc_program_name,
         f.actual_start_date
             start_on,
         f.actual_completion_date
             end_on,
         p.concurrent_program_name
             concurrent_program_name,
         DECODE (f.phase_code,
                 'R', 'RUNNING',
                 'C', 'COMPLETED',
                 f.phase_code)
             phase,
         DECODE (f.status_code,  'C', 'NORMAL',  'E', 'ERROR',  f.status_code)
             Status,
         f.requested_by,
         fu.user_id,
         fu.user_name
    FROM apps.fnd_concurrent_programs   p,
         apps.fnd_concurrent_programs_tl pt,
         apps.fnd_concurrent_requests   f,
         apps.fnd_user                  fu
   WHERE     f.concurrent_program_id = p.concurrent_program_id
         AND f.program_application_id = p.application_id
         AND f.concurrent_program_id = pt.concurrent_program_id
         AND f.program_application_id = pt.application_id
         AND pt.language = USERENV ('lang')
         AND f.actual_start_date IS NOT NULL
         AND f.actual_start_date >
             TO_DATE ('15-DEC-2021 00:00:00', 'DD-MON-YYYY HH24:MI:SS')
         AND f.actual_completion_date <
             TO_DATE ('17-DEC-2021 23:59:59', 'DD-MON-YYYY HH24:MI:SS')
         AND f.requested_by = fu.user_id
         AND pt.USER_CONCURRENT_PROGRAM_NAME = '&User_concurrent_program_name'
--AND fu.user_name = '&user_name'
ORDER BY f.actual_start_date ASC; 

##Change the date accordingly.



Query to find Concurrent Program Execution timing history :



SELECT a.user_name,
         a.description,
         b.USER_CONCURRENT_PROGRAM_NAME,
         b.CONCURRENT_PROGRAM_NAME,
         d.APPLICATION_SHORT_NAME,
         COUNT (1),
         c.actual_start_date                start_on,
         c.actual_completion_date           end_on,
DECODE (f.phase_code,
                 'R', 'running',
                 'C', 'complete',
                 c.phase_code)              phase,
         c.status_code,
         ROUND (
               SUM (c.actual_completion_date - c.actual_start_date)
             * 24
             * 60
             / COUNT (1),
             2)    avg_run_time_min,
         C.argument_text "parameter",
         C.request_id
    FROM apps.fnd_concurrent_programs_vl b,
         APPS.FND_CONCURRENT_REQUESTS   c,
         apps.FND_APPLICATION_VL        d,
         fnd_user                       a
   WHERE     c.CONCURRENT_PROGRAM_ID = b.CONCURRENT_PROGRAM_ID
         AND c.PROGRAM_APPLICATION_ID = b.APPLICATION_ID
         AND c.requested_by = a.user_id
         AND b.application_id = d.application_id
         AND c.actual_start_date >=
             TO_DATE ('20-NOV-2021 00:01', 'DD-MON-YY HH24:Mi')
         AND c.ACTUAL_COMPLETION_DATE <=
             TO_DATE ('17-DEC-2021 23:59', 'DD-MON-YY HH24:Mi')
         AND b.USER_CONCURRENT_PROGRAM_NAME = '&User_concurrent_program_name'
GROUP BY a.user_name,
         a.description,
         b.USER_CONCURRENT_PROGRAM_NAME,
         B.CONCURRENT_PROGRAM_NAME,
         d.APPLICATION_SHORT_NAME,
         C.argument_text,
         C.request_id
         ,c.actual_start_date,
         c.actual_completion_date
ORDER BY 7 DESC;

## Change the Date and Time accordingly


Best Wishes!! 

No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Increase Java Heap memory for OEM

 There are certain times when we observer OEM is performing slow or even unable to startup the Admin Server or OMS Server. We can look into ...