Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Alert log error checking script for Windows?
Perhaps this is a start. The following script uses blat (www.blat.net)
to send the email.
ora-alerts.cmd:
set workdir=c:\oracle\admin\orcl\bdump
pushd %workdir%
find "ORA-" ORCLALRT.LOG > c:\dbwork\alerts.txt
if errorlevel 1 goto END
blat c:\dbwork\alerts.txt -t Jeff.Eberhard_at_gmail.com -s "Oracle WINSPC
Alert"
call c:\dbwork\datetype.bat orclalrt.log
:END
popd
datetype.bat:
@Echo OFF
TITLE DateName
REM DateName.CMD
REM takes a filename as %1 and renames as %1_YYMMDDHHMM
REM
REM -------------------------------------------------------------IF %1.==. GoTo USAGE
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j
Set PARSEARG="eol=; tokens=1,2,3* delims=:, " For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k
Echo RENAME %1 %1_%YYYYMMDD%%HHMM%
RENAME %1 %1_%YYYYMMDD%%HHMM%
GoTo END
:USAGE
Echo Usage: DateName filename
Echo Renames filename to filename_YYYYMMDDHHMM
GoTo END
:END
REM
TITLE Command Prompt
> -----Original Message-----
> From: Alex [mailto:stant_98_at_yahoo.com]
> Sent: Friday, October 15, 2004 1:42 PM
> To: oracle-l_at_freelists.org
> Subject: Alert log error checking script for Windows?
>
>
> Hello all,
>
> I was wondering if someone can help out with a alert log
> error checking batch file for Windows. I'd like to do daily
> checks of alert log and send an email if any errors are found.
>
> As always, Thanks!
>
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 15 2004 - 15:30:30 CDT
![]() |
![]() |