-
Do you know any script or windows tools that Scan the ORACLE alert log for errors using the FINDSTR command and email it to me if it find ORA- String??
An ounce of prevention is worth a pound of cure
-
Are you running unix, cause I have a script for UNIX.
OCP 8i, 9i DBA
Brisbane Australia
-
Hi Johnson,
Can you send it me. my email id is : nrgannamani@yahoo.com
Thanks in Advance
Nagesh
-
Hi johnson,
Pls.send that script to me
My mail id :
ravisanapala@yahoo.com
-
hi johnson,
Can you please send me the script aswell.
email: kevwidd@hotmail.com
Thanks in advance
Kev.
-
Script: #!/bin/ksh
#---------------------------------------------------------------------------
-------
#
# Filename: alerts.ksh
#
# Description: Automatic monitoring of the production
# database's ALERT LOG file for exceptions.
#
# Author: Sandeep Sahore
#
#---------------------------------------------------------------------------
-------
#
# Initialize the variables that are to be used in this script.
#
C_DATE=`date +"%a %b %e "`
C_HOUR=`date +"%H"`
C_TIME=`date +"%p"`
DBA='your_login_name@some_org.com'
#
# Xtract current date records from alert file & scan it for ORA-errors.
#
sed -n "/^$C_DATE/,$ p"
$ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_.log > temp$$
#
sed -n '/^ORA-/ p' temp$$ > ora_errors
#
# Variable LN_CNT initialized to the no. of lines in the ora_errors
file.
#
LN_CNT=`wc -l < ora_errors`
#
# If ora_errors file has lines in it, then mail is sent to the DBA.
#
if [[ $LN_CNT -ge 1 ]]
then
mailx -s 'Please Check the ALERT_PLCPRD.LOG File for Errors' $DBA
<
ora_errors
fi
#
# Reschedule daily execution of script - morning, evening and night.
#
if [[ $C_TIME = PM ]]
then
if [[ C_HOUR -ge 16 & C_HOUR -lt 23 ]]
then
at -mk 11:55pm <;-EOF
alerts.ksh
EOF
else
at -mk 8:00am <-%%
alerts.ksh
%%
fi
elif [[ $C_TIME = AM ]]
then
at -mk 4:00pm <-!!
alerts.ksh
!!
else
:
fi
#
trap 'rm temp$$' 0 2 3 15
#
# end-of-script
#
PS: copy the above to UNIX VI Editor and see the if you need any changes.
Thanks
Madhu
-
Actually our Database is in Windows NT, I need the script for Windows NT, that's whyt I said FINDSTR which is a DOS Batch command , please provide if you have a clue
An ounce of prevention is worth a pound of cure
-
I would also be interested in this script for Windows NT
-
The following Link might help you ...
I have never worked on NT, so after downloading the script, i suggest you go for R&D and then only implemet in production
http://www.peoplesoftpros.net/net/sc...sp?scriptid=39
Thanks,
Madhu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|