#!/bin/ksh
. /u01/oraprod.env
# RMINC_run_high_requests.sh
# Copyright 2000, All Rights Reserved, Reed-Matthews, Inc.
# Runs RMINC_high_requests.sql, which looks for when there are more 
# than 30 jobs pending in any concurrent manager.
# This program sends email if a manager has more
# than 30 jobs pending.  It also passes the number of pending requests
# so you can see if the number is decreasing.  It is possible, after
# all, for one user to submit a whole pile of fast running requests.
# As long as they clear out, it's not a problem.
sqlplus apps/apps @$RMINC_TOP/sql/RMINC_high_requests1.sql 
summary_result=`cat $RMINC_TOP/sql/RMINC_high_requests_results2.lst`
if (( $summary_result >= 1 )); then
cat $RMINC_TOP/sql/RMINC_high_requests_results1.lst| grep -v :0 | mailx -s "THERE ARE A HIGH NUMBER OF CONCURRENT REQUESTS PENDING!!" barb@oncalldba.com
fi
##End of file
