Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Tuesday, November 10, 2015

Script to Check the Concurrent Manager Programs that ended up in an Error

spool ${ORACLE_SID}_concerr_rpt.txt
REM $Header:chk_conc_error.sql$
REM
REM  | DESCRIPTION
REM  |    Lists the Concurrent Manager programs that ended with status other than Normal
REM  +=======================================================================*/

PROMPT ********************************************************
PROMPT        Database Concurrent Manager Status Report
PROMPT ********************************************************
PROMPT
PROMPT

SET SERVEROUTPUT ON

REM------------------------------------------------------
REM Description:
REM   Displays Concurrent Programs ended with an Error
REM------------------------------------------------------

PROMPT
PROMPT
PROMPT ********************************************************
PROMPT  Concurrent Manager Programs that ended with an Error
PROMPT ********************************************************
PROMPT

PROMPT Request Id     ConcurrentID Start Date    Pgm. Name   Status    Phase
PROMPT **********************************************************************
PROMPT

COLUMN a.request_id FORMAT 999999999 HEADING "Request Id"
COLUMN a.CONCURRENT_PROGRAM_ID FORMAT 99999999 HEADING "Concurrent ID"
COLUMN a.ACTUAL_START_DATE FORMAT A10 HEADING "Start Date"
COLUMN b.CONCURRENT_PROGRAM_NAME FORMAT A14 HEADING "Program Name"
COLUMN a.Status_code FORMAT A10 HEADING "Status Code"
COLUMN a.Phase_code FORMAT A10 HEADING "Phase Code"
PROMPT

select a.request_id "RequestID",a.CONCURRENT_PROGRAM_ID "Conc.ID",a.ACTUAL_START_DATE "StartDate",b.CONCURRENT_PROGRAM_NAME "Program",
a.Status_code "Status",a.Phase_code "Phase" from fnd_concurrent_requests a,Fnd_Concurrent_Programs b where a.STATUS_CODE='E'
and Phase_code='C' and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID and (trunc(sysdate-a.ACTUAL_START_DATE)<2);
/

PROMPT
PROMPT ********************************************************
PROMPT  Concurrent Manager Programs that ended with Warnings
PROMPT ********************************************************
PROMPT

PROMPT Request Id     ConcurrentID Start Date    Pgm. Name   Status    Phase
PROMPT **********************************************************************
PROMPT

COLUMN a.request_id FORMAT 999999999 HEADING "Request Id"
COLUMN a.CONCURRENT_PROGRAM_ID FORMAT 99999999 HEADING "Concurrent ID"
COLUMN a.ACTUAL_START_DATE FORMAT A10 HEADING "Start Date"
COLUMN b.CONCURRENT_PROGRAM_NAME FORMAT A14 HEADING "Program Name"
COLUMN a.Status_code FORMAT A10 HEADING "Status Code"
COLUMN a.Phase_code FORMAT A10 HEADING "Phase Code"
PROMPT

select a.request_id "RequestID",a.CONCURRENT_PROGRAM_ID "Conc.ID",a.ACTUAL_START_DATE "StartDate",b.CONCURRENT_PROGRAM_NAME "Program",
a.Status_code "Status",a.Phase_code "Phase" from fnd_concurrent_requests a,Fnd_Concurrent_Programs b where a.STATUS_CODE='G'
and Phase_code='C' and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID and (trunc(sysdate-a.ACTUAL_START_DATE)<2);
/

PROMPT
PROMPT
PROMPT
PROMPT *****************************************************************
PROMPT  Concurrent Manager Programs that ended with status as Cancelled
PROMPT *****************************************************************
PROMPT

PROMPT Request Id     ConcurrentID Start Date    Pgm. Name   Status    Phase
PROMPT **********************************************************************
PROMPT

COLUMN a.request_id FORMAT 999999999 HEADING "Request Id"
COLUMN a.CONCURRENT_PROGRAM_ID FORMAT 99999999 HEADING "Concurrent ID"
COLUMN a.ACTUAL_START_DATE FORMAT A10 HEADING "Start Date"
COLUMN b.CONCURRENT_PROGRAM_NAME FORMAT A14 HEADING "Program Name"
COLUMN a.Status_code FORMAT A10 HEADING "Status Code"
COLUMN a.Phase_code FORMAT A10 HEADING "Phase Code"
PROMPT
select a.request_id "RequestID",a.CONCURRENT_PROGRAM_ID "Conc.ID",a.ACTUAL_START_DATE "StartDate",b.CONCURRENT_PROGRAM_NAME "Program",
a.Status_code "Status",a.Phase_code "Phase" from fnd_concurrent_requests a,Fnd_Concurrent_Programs b where a.STATUS_CODE='D'
and Phase_code='C' and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID and (trunc(sysdate-a.ACTUAL_START_DATE)<1);
/
PROMPT
PROMPT
PROMPT
PROMPT *****************************************************************
PROMPT  Concurrent Manager Programs that ended with status as Paused
PROMPT *****************************************************************
PROMPT

PROMPT Request Id     ConcurrentID Start Date    Pgm. Name   Status    Phase
PROMPT **********************************************************************
PROMPT

COLUMN a.request_id FORMAT 999999999 HEADING "Request Id"
COLUMN a.CONCURRENT_PROGRAM_ID FORMAT 99999999 HEADING "Concurrent ID"
COLUMN a.ACTUAL_START_DATE FORMAT A10 HEADING "Start Date"
COLUMN b.CONCURRENT_PROGRAM_NAME FORMAT A14 HEADING "Program Name"
COLUMN a.Status_code FORMAT A10 HEADING "Status Code"
COLUMN a.Phase_code FORMAT A10 HEADING "Phase Code"
PROMPT
select a.request_id "RequestID",a.CONCURRENT_PROGRAM_ID "Conc.ID",a.ACTUAL_START_DATE "StartDate",b.CONCURRENT_PROGRAM_NAME "Program",
a.Status_code "Status",a.Phase_code "Phase" from fnd_concurrent_requests a,Fnd_Concurrent_Programs b where a.STATUS_CODE='W'
and Phase_code='C' and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID and (trunc(sysdate-a.ACTUAL_START_DATE)<2);
/
PROMPT
PROMPT
PROMPT
PROMPT *****************************************************************
PROMPT  Concurrent Manager Programs  - Terminating Requests
PROMPT *****************************************************************
PROMPT

PROMPT Request Id     ConcurrentID Start Date    Pgm. Name   Status    Phase
PROMPT **********************************************************************
PROMPT

COLUMN a.request_id FORMAT 999999999 HEADING "Request Id"
COLUMN a.CONCURRENT_PROGRAM_ID FORMAT 99999999 HEADING "Concurrent ID"
COLUMN a.ACTUAL_START_DATE FORMAT A10 HEADING "Start Date"
COLUMN b.CONCURRENT_PROGRAM_NAME FORMAT A14 HEADING "Program Name"
COLUMN a.Status_code FORMAT A10 HEADING "Status Code"
COLUMN a.Phase_code FORMAT A10 HEADING "Phase Code"
PROMPT
select a.request_id "RequestID",a.CONCURRENT_PROGRAM_ID "Conc.ID",a.ACTUAL_START_DATE "StartDate",b.CONCURRENT_PROGRAM_NAME "Program",
a.Status_code "Status",a.Phase_code "Phase" from fnd_concurrent_requests a,Fnd_Concurrent_Programs b where a.STATUS_CODE='T'
and Phase_code='R' and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID and (trunc(sysdate-a.ACTUAL_START_DATE)<2);
/
PROMPT
PROMPT
PROMPT ********************************************************
PROMPT  End of Concurrent Manager Program Report
PROMPT ********************************************************
Spool Off
/
SET SERVEROUTPUT OFF



No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect