bkreynolds48
asked on
oracle alert log script to check for errors
I have several databases on several machines
unix - aix - oracle 10 & 11
I need a script to run in cron that will check each alert log for oracle errors and email me if there are any errors, what they are and what database/system they come from
unix - aix - oracle 10 & 11
I need a script to run in cron that will check each alert log for oracle errors and email me if there are any errors, what they are and what database/system they come from
bk, I read into your requirements that you want one script, on one host, to query multiple systems. As Burleson mentions, you need to be looking at Oracle Grid Control if that's accurate. One overall job scheduling / system monitoring tool, with agents on each managed host.
Alternatively, you could set up your alert log as an external table and query it from each instance. Excellent example of that here:
http://www.adp-gmbh.ch/ora/admin/scripts/read_alert_log.html
You could then schedule a job to query that table and send you output periodically if anything new appears that you aren't specifically excluding, and if you get new messages that you decide are OK, you can go back to the scripting and exclude them as well.
http://www.adp-gmbh.ch/ora/admin/scripts/read_alert_log.html
You could then schedule a job to query that table and send you output periodically if anything new appears that you aren't specifically excluding, and if you get new messages that you decide are OK, you can go back to the scripting and exclude them as well.
ASKER
wasimibm
I looked at his script - I have one pretty much the same
so my only option for multiple databases - lets just say on one system - is to duplicate the script for each of the databases I have? there does not appear to be any loop to grap the database names from the oratab file
Steve Wales - I can't make that kind of change on production systems.
I looked at his script - I have one pretty much the same
so my only option for multiple databases - lets just say on one system - is to duplicate the script for each of the databases I have? there does not appear to be any loop to grap the database names from the oratab file
Steve Wales - I can't make that kind of change on production systems.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you could refer to one of sites which has a scenario where in there are multiple databases hosted on a single system.. I hope this would suffice your requirement to monitor multiple databases by querying /etc/oratab. he had done it so via some file
for SID in `cat $ORACLE_HOME/sidlist`
check this link for further details
https://communities.bmc.com/docs/DOC-9942#alertlog
for SID in `cat $ORACLE_HOME/sidlist`
check this link for further details
https://communities.bmc.com/docs/DOC-9942#alertlog
ASKER
Steve,
thanks I will give it a try
thanks I will give it a try
http://www.dba-oracle.com/t_linux_shell_script_check_alert_log.htm