Simple K-shell (Linux,UNIX) program to monitor concurrent programs and provide feedback.
- Oracle Applications: The Concurrent Jobs Ran Yesterday and Failed – SQL script & Unix Shell Script
- How to secure login with oracle SQL*Plus with a password On UNIX and Linux platforms.
- How To Extract,Using Bash/Unix/Linux Shell Scripting, The Oracle Data Like Excel Report And Send As Email Attachment?
- Setting the Applications Context FND_GLOBAL.APPS_INITIALIZE in oracle applications.
- Oracle applications – List all the concurrent Jobs ran by user.
I wrote a Korn-shell (Linux,UNIX) program to monitor concurrent programs. This is tested and working well.
This is a simple sample to connect through sqlplus and select the fnd tables to get the status
#**************************************************************************************************
# This is the concurrent program monitor script
#
# In test cycles the programs failed to run or failed to be scheduled.
# This will constantly monitor the programs.
# It will automatically send an email alert if it fails
#
# Parameter: Concurrent Program Short name and the user run the program
#
#**************************************************************************************************
#
#
#
export USERNAME="$1"
export PASSWORD="$2"
export DATABASE="$3"
export CONCPROG="$4"
export CONCPROG="$5"
export APPSUSER="$6"
. /apps/${DATABASE}/appl_top/APPSORA.env
sqlplus -s ${USERNAME}/${PASSWORD} <<EOF
SET TERM OFF
SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET PAUSE OFF
SET VERIFY OFF
set linesize 120
spool ${CONCPROG}.txt
select
fcr.REQUEST_ID”‘-’”
fu.user_name”‘-’”
fcr.PHASE_CODE”‘-’”
fcr.STATUS_CODE”‘-’”
trunc(( nvl(fcr.ACTUAL_COMPLETION_DATE,sysdate) – fcr.ACTUAL_START_DATE) * 24 * 60,2) ”‘-’”
–fcpt.USER_CONCURRENT_PROGRAM_NAME ”‘-’”
fcp.CONCURRENT_PROGRAM_NAME ”‘-’”
fcr.ACTUAL_START_DATE ”‘-’”
nvl(fcr.ACTUAL_COMPLETION_DATE,sysdate) RequestDetails
FROM
FND_CONCURRENT_REQUESTS FCR,
FND_CONCURRENT_PROGRAMS FCP,
FND_CONCURRENT_PROGRAMS_TL FCPT,
FND_USER FU
where 1=1
and fcp.CONCURRENT_PROGRAM_ID=fcr.CONCURRENT_PROGRAM_ID
and fcpt.CONCURRENT_PROGRAM_ID=fcp.CONCURRENT_PROGRAM_ID
AND FCR.REQUESTED_BY = FU.USER_ID
AND FU.USER_NAME = ‘${APPSUSER}’
and fcp.CONCURRENT_PROGRAM_NAME = ‘${CONCPROG}’;
spool off;
EOF
# Grep "C-C" gives completed, normal status
RETVAL=`cat ${CONCPROG}.txt ‘ grep -i ${CONCPROG} ‘ grep -i "C-C" ‘ wc -l`; export RETVAL;
if [ ${RETVAL} != 0 ]
then
echo "${CONCPROG} completed successfully"
else
echo "${CONCPROG} not completed successfully"
fi

I noticed that this is not the first time you write about the topic. Why have you decided to write about it again?
If you ever want to see a reader’s feedback
, I rate this article for four from five. Decent info, but I have to go to that damn google to find the missed parts. Thank you, anyway!