Hello All,
I have a script, which cleans up the archive log destination by moving the
old archive logs to a retention area based on the thresholds 
1. Percent of space utilization
2. greater than 2 days old.

The script was working fine , except for the reason , sometimes we see
multiple copies of the same. So I have added the following to code just to
stop multiple copies. But now the script is not running at all and we did
see more than 90% space utilization archive log destination.

Here is the added code:

####################################################
# Exit If Already Running
####################################################
function ExitIfAlreadyRunning
{
copies=`ps -ef | grep OraProcessArch | grep "$SID_NAME" | grep -v grep | wc
-l`
if [ $copies -gt 2 ]
then
   echo $(date)" Number Of Copies Running : $copies"
   exit 0
else
   return 0
fi
}

Any suggestions ???

I am not  so good in using semaphores and all , looking for a simple
solution if possible ..

Thanks in advance,
Madhu

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Reddy, Madhusudana
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to