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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need tools to send mail about monitoring result of Oracle alert log in NT/2000

Re: Need tools to send mail about monitoring result of Oracle alert log in NT/2000

From: kc <kc_news2000_at_yahoo.com>
Date: 17 Nov 2003 10:43:03 -0800
Message-ID: <a20fe1ab.0311171043.482b84c2@posting.google.com>


ccwei_at_ms1.pchome.com.tw (Alvin) wrote in message news:<f344d6c4.0311150043.632494a4_at_posting.google.com>...
> Hi
>
> I need a tool to send mail about monitoring result of Oracle alert log in
>
> NT/2000.
>
> Could anyone advise me if there's any tools available now?
>
> Joseph Chang
>
> Best Regards

Joseph,
I use blat on my Windows Oracle Servers for alerts. Here is one my scripts.
This sends me any errors in the ALERT log. I read it every morning. It also
dates the files and gives the SID in the email subject. I have this scheduled every morning at 7:30 AM. You need blat installed and in the PATH before using it.

It's pretty basic but it gets the job done.

Kevin

REM run the job to search the Oracle Alert Log

:GET_DATE
    for /f "tokens=2" %%i in ('date /t') do set DATE!=%%i     set DATE!=%DATE!:/=-%

SET LOGLOC="G:\Oracle_db\<path>\bdump\"
SET LOG= "G:\Oracle_db\<path>\bdump\<dbsid>ALRT.log" SET DB="<dbsid>"
SET ERRORS="G:\Oracle_db\<path>\bdump\ERRORS_%DB%_%DATE!%.txt"

REM Search for errors and output a file that is dated FINDSTR "ORA-" %LOG% > "%ERRORS%" copy %LOG% %LOGLOC%alert_%DB%_%DATE!%.log DEL %LOG%
echo %DATE!%_Started > %LOG%
time /t >> %LOG%

REM email the log errors to me
Blat d:\scripts\alertlogs\alertmail.txt -subject "Oracle %DB% Database Alert errors" -to user_at_domain.com -attach %ERRORS%

REM uncomment the pause to make sure blat is working REM pause

exit Received on Mon Nov 17 2003 - 12:43:03 CST

Original text of this message

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