Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Backup batch error
Hi all,
What I am trying to accomplish is to update my backup batch to scan the temp backup log file for any error that might occur during the backup. In either case (if or if not errors occur), I'd like to send an e-mail(using blat). What's happening right now is that I get emails even when no error occur with subject that the backup did not complete successfully.
cold_backup.txt is the temp log where backup is spooled to.
Here is the portion of the code I'm strugling with:
set ERRFILE=E:\oracle\admin\remprod\bdump\ALERT_ERRORS.TXT set TEMP_ALERT_LOG=E:\oracle\oradata\remprod\archives\cold_backup\cold_backup.txt set SUBJECT1=Database Backup Completed Successfully set SUBJECT2=Database Backup did not Complete Successfully
del /q E:\oracle\admin\remprod\bdump\ALERT_ERRORS.TXT
@echo off
if exist %TEMP_ALERT_LOG% findstr /n "corrupt Corrupt CORRUPT ORA- OSD- O/S-" %TEMP_ALERT_LOG% > %ERRFILE%
@echo on
blat %ERRFILE% -s "%SUBJECT2%" -t %EMAIL_ADDRESS_1%
if %ERRORLEVEL% = 1
blat %ERRFILE% -s "%SUBJECT1%" -t %EMAIL_ADDRESS_1%
What am I doing wrong?
Thanks in advance!
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Sep 30 2004 - 09:41:09 CDT
![]() |
![]() |