Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Alert log error checking script for Windows?

RE: Alert log error checking script for Windows?

From: Eberhard, Jeff <Jeff.Eberhard_at_TriumphGS.com>
Date: Fri, 15 Oct 2004 14:34:55 -0600
Message-ID: <86B94CDA99C77A408129A378D2DA8DB801528B3E@compqsrv.rolls-roycegs.com>


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
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP

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-l
Received on Fri Oct 15 2004 - 15:30:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US