Saturday, September 5, 2009

Concurrent request status

select REQUEST_ID , CONCURRENT_PROGRAM_ID , status_code , phase_code
from  fnd_concurrent_requests where request_id='&a' ;
STATUS_CODE Meaning:  
===================
    A    Waiting   
    B    Resuming   
    C    Normal   
    D    Cancelled  
    E    Error   
    F    Scheduled   
    G    Warning   
    H    On Hold   
    I    Normal   
    M    No Manager   
    Q    Standby   
    R    Normal   
    S    Suspended   
    T    Terminating   
    U    Disabled   
    W    Paused   
    X    Terminated   
    Z    Waiting   
PHASE_CODE Meaning:
==================
    C    Completed
    I    Inactive
    P    Pending
    R    Running
Check Requests By Name
======================





set lines 132
set trims on
set echo off
set feed on
set pages 60

col request_id heading "Request ID"
col requested_start_date heading "Start Date"
col user_name format a10 trunc heading "APPS User"
col prg_name format a30 trunc heading "Program Name"
col args format a45 trunc heading "Agruments [first 45 chars]"

prompt Scheduled or running requests by date:
prompt

select /*+ ORDERED */
       reqs.request_id
,      reqs.requested_start_date requested_start_date
,      reqs.phase_code
,      reqs.status_code
,      reqs.hold_flag
,      reqs.cancel_or_hold
,      usr.user_name
,      prg.user_concurrent_program_name prg_name
,      argument_text args
from  apps.fnd_user usr
,     apps.fnd_concurrent_requests reqs
,     apps.fnd_concurrent_programs_tl prg
where reqs.phase_code IN ('P','R')
and   reqs.concurrent_program_id = prg.concurrent_program_id
and   prg.user_concurrent_program_name like '%Purge Logs and Closed System Alerts%'
and   reqs.requested_by = usr.user_id
order by DECODE(reqs.phase_code,'R',1,2)
,        reqs.requested_start_date
,        usr.user_name
/

No comments:

Post a Comment