Could anyone please help?
I have written a small program that's actually working fine for me and extracting all the details I required. What code does is, it goes to all archivelog directories and see if archivelog backup was failed or successful
Code:
<<CODE>>
TMP_FILE='/ora/rman/scripts/tmp_chk.log'
chkbck ()
{
for i in `ls /ora/rman/logs/`;
do
find /ora/rman/logs/$i/backup_a*.log -mtime -1 2>/dev/null
done
}
for i in `chkbck`;
do
print $i | cut -d"_" -f3
print $i | cut -d"/" -f6
egrep -i 'Starting backup*' $i
egrep -i 'Finished backup*' $i
if egrep -i 'exit status [^0]' $i
then
print "Backup Failed"
else
print "Backup Successful"
fi
done > $TMP_FILE