Hi Mark,
I wrote the following bit of code (not good enough to call a script!) to check our alert log for deadlock trace files
awk -f j.awk -v DateStr="Nov" -v SearchStr="info" alert.log > a.lis
numberOfLines=`grep info a.lis |wc -l`
if [ $numberOfLines -gt 0 ]
then
cat a.lis|mailx -s "Trace files detected" [EMAIL PROTECTED]
else
cat a.lis|mailx -s "No problems" [EMAIL PROTECTED]
fi
output looks something like this
Mon Nov 05 10:04:09 2001 ORA-00060: Deadlock detected. More info in file e:\ora.
Mon Nov 05 11:10:28 2001 ORA-00060: Deadlock detected. More info in file e:\ora.
Mon Nov 05 11:10:38 2001 ORA-00060: Deadlock detected. More info in file e:\ora.
Mon Nov 05 11:46:55 2001 ORA-00060: Deadlock detected. More info in file e:\ora.
Not perfect but almost there. Searching for Nov or Dec etc and the word info and then pulling the next line out
a.awk looks like
$2==DateStr{ oldline=$0
getline
if (match($0,SearchStr) >0){
print oldline,$0
}
}
I am sure there will be better examples provided but at least I wrote this myself and I am learning from it. It still needs something doing with the date. I am trying to translate this into a perl script as well but even less progress on that.
John
-----Original Message-----
From: Mark Leith [mailto:[EMAIL PROTECTED]]
Sent: 15 November 2001 10:00
To: Multiple recipients of list ORACLE-L
Subject: ORAxxxx & trace files.
Hi list,
Does anybody have a good list of all the ORA errors that will cause a trace
file to be generated? We have a user of our tools that wants to monitor for
any trace files/dumps being generated. I can think of two ways:
1) monitor the alert log as above for specific errors
2) monitor the directories that these are generated in (bdump/cdump etc.)
for any new files generated in the timeframe..
Anybody already doing this - or have any scripts to save me re-inventing the
wheel?
Cheers
Mark
===================================================
Mark Leith | T: +44 (0)1905 330 281
Sales & Marketing | F: +44 (0)870 127 5283
Cool Tools UK Ltd | E: [EMAIL PROTECTED]
===================================================
http://www.cool-tools.co.uk
Maximising throughput & performance
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mark Leith
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
**********************************************************************
This email and any attachments may be confidential and the subject of
legal professional privilege. Any disclosure, use, storage or copying
of this email without the consent of the sender is strictly prohibited.
Please notify the sender immediately if you are not the intended
recipient and then delete the email from your inbox and do not
disclose the contents to another person, use, copy or store the
information in any medium.
**********************************************************************
