Thursday 17 July 2014

Concurrent Program Execution Details Query

/* Formatted on 7/17/2014 1:17:36 PM (QP5 v5.115.810.9015) */
SELECT prog.concurrent_program_id,
       prog.concurrent_program_name,
       prog.user_concurrent_program_name,
       req.request_id,
       TO_CHAR (req.actual_start_date, 'DD-MON-YYYY HH24:MI:SS')
          actual_start_date,
       TO_CHAR (req.actual_completion_date, 'DD-MON-YYYY HH24:MI:SS')
          actual_completion_date,
       FLOOR ( (actual_completion_date - actual_start_date) * 24) || ':'
       || FLOOR( ( (actual_completion_date - actual_start_date) * 24
                  - FLOOR ( (actual_completion_date - actual_start_date) * 24))
                * 60)
       || ':'
       || FLOOR( ( (actual_completion_date - actual_start_date) * 24 * 60
                  - FLOOR(  (actual_completion_date - actual_start_date)
                          * 24
                          * 60))
                * 60)
          duration,
       argument_text,
       usr.user_name,
       resp.responsibility_name
FROM apps.fnd_concurrent_programs_vl prog,
     apps.fnd_concurrent_requests req,
     apps.fnd_responsibility_vl resp,
     apps.fnd_user usr
WHERE (prog.user_concurrent_program_name = 'Workflow Background Process'
       OR prog.user_concurrent_program_name LIKE
            'Workflow Background Process'
       OR prog.concurrent_program_name LIKE 'APPBCF')
      AND prog.concurrent_program_id = req.concurrent_program_id
      AND prog.application_id = req.program_application_id
      AND req.responsibility_id = resp.responsibility_id
      AND req.responsibility_application_id = resp.application_id
      AND req.requested_by = usr.user_id
      /* AND argument_text like '%OEO%' */
      AND req.actual_start_date > SYSDATE - 10
ORDER BY prog.user_concurrent_program_name, req.actual_start_date DESC

No comments:

Post a Comment