Thanks Larry. I am on my way to becoming a Google pro these days! :) Wolfson Larry - lwolfs <lawrence.wolfson@xxxxxxxxxx> wrote:Alex, Looking at the syntax I found with google I think you need something like if %ERRORLEVEL% = 1 blat %ERRFILE% -s "%SUBJECT1%" -t %EMAIL_ADDRESS_1% if %ERRORLEVEL% = 0 blat %ERRFILE% -s "%SUBJECT2%" -t %EMAIL_ADDRESS_1% -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Alex Sent: Thursday, September 30, 2004 3:07 PM To: Wolfson Larry - lwolfs; oracle-l@xxxxxxxxxxxxx Subject: RE: Backup batch error Thanks for your reply! Where would you test it? Thanks Wolfson Larry - lwolfs wrote: I'm just guessing but it looks like your testing the value of ERRORLEVEL tooo late -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Alex Sent: Thursday, September 30, 2004 9:45 AM To: oracle-l@xxxxxxxxxxxxx Subject: 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.tx t 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! --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- //www.freelists.org/webpage/oracle-l ********************************************************************** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! -- //www.freelists.org/webpage/oracle-l --------------------------------- Do you Yahoo!? vote.yahoo.com - Register online to vote today! -- //www.freelists.org/webpage/oracle-l