查看报表最近30天的运行情况

/* Formatted on 2018/3/15 13:02:46 (QP5 v5.256.13226.35538) */

  SELECT                                                                                                              -- q.concurrent_queue_name qname

        f.user_name || ': ' || f.description user_desc

       , a.request_id "Req Id"

       --  ,decode(a.parent_request_id,-1,NULL,a.parent_request_id) "Parent"

       , a.concurrent_program_id "Prg Id"

       , DECODE (a.phase_code,  'C', 'Completed',  'I', 'Inactive',  'P', 'Pending',  'R', 'Running',  a.phase_code) "Phase_Code"

       , DECODE (a.status_code

               , 'G', 'Warning'

               , 'C', 'Normal'

               , 'E', 'Error'

               , 'R', 'Normal'

               , 'D', 'Cancelled'

               , 'I', 'Scheduled'

               , 'X', 'Terminated'

               , a.status_code)

            "Status_Code"

       --      ,b.os_process_id "OS"

       --      ,vs.sid

       --      ,vs.serial# "Serial#"

       --      ,vp.spid

       , a.oracle_process_id "spid"

       , a.actual_start_date

       , a.actual_completion_date

       , ROUND ( (NVL (a.actual_completion_date, SYSDATE) - a.actual_start_date) * 1440, 2) "Time--Minutes"

       , c.concurrent_program_name || ' - ' || c2.user_concurrent_program_name || ' ' || a.description "Program"

       , a.phase_code

       , a.argument_text

    FROM applsys.fnd_concurrent_requests a

       , applsys.fnd_concurrent_processes b

       , applsys.fnd_concurrent_queues q

       , applsys.fnd_concurrent_programs_tl c2

       , applsys.fnd_concurrent_programs c

       , applsys.fnd_user f

   --    ,v$session vs

   --    ,v$process vp

   WHERE a.controlling_manager = b.concurrent_process_id

     AND a.concurrent_program_id = c.concurrent_program_id

     AND a.program_application_id = c.application_id

     AND c2.concurrent_program_id = c.concurrent_program_id

     AND c2.application_id = c.application_id

     -- and a.phase_code in ('I','P','R','T')

     AND a.requested_by = f.user_id

     AND b.queue_application_id = q.application_id

     AND b.concurrent_queue_id = q.concurrent_queue_id

     AND c2.language = 'US'

     --     AND c2.user_concurrent_program_name LIKE 'CUX%'

     AND a.actual_start_date > SYSDATE - 30

ORDER BY a.actual_start_date;

posted @ 2018-03-15 13:04  全威儒  阅读(429)  评论(0编辑  收藏  举报