Oracle Alert Monitoring, Copy & Cleanup

Need to monitor my alert logs: Oracle=11.2.0.3 & + & OS= AIX 6 & OLE 5

1. Get email as soon as there is any ORA- in the alert log, also looking for HSM related message too, or if there is any other text/string, if needed
2. Have to keep only 10 or 15 days of alert.log at the primary location, rest should be copy/purge to a secondary location
3. Also is there any fastest way to check/look into alert log, instead of first locating the directory (v$diag_info) and then cd and then tail -100f

Please assist/advice ... thanks in advance.
Mushfique KhanDirector OperationsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnsoneSenior Oracle DBACommented:
If you are looking to query the alert log, look at X$DBGALERTEXT.  You can also set up an external table that reads the alert log.

To keep a certain number of days, I suggest a cron job that rotates the log every day.  We used to do it weekly, but easy enough to do every day.  All you should have to do is rename the alert log with a date stamp.  A new one will automatically be created.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark GeerlingsDatabase AdministratorCommented:
I do two things to help manage our Oracle alert_*.log files:
1. I move them out of the default location, since I don't want log and trace files to possibly fill up my ORACLE_HOME disk location.  The size of the ORACLE_HOME remains quite static this way, except when patches or upgrades get applied.  To change the default location for these files do:
alter system set diagnostic_dest=[a valid disk path on your system] scope=both;
2. Use a "cron" (or OEM) job to rename the alert*.log file each night at 11:59pm to include the numeric month and day.  Here are the commands that we use for that in a Linux system:
cd /s10/diag/rdbms/prod/prod/trace
# wait 45 seconds to be close to midnight:
sleep 45
mv alert_prod.log alert_prod_`date '+%m%d'`.log
# Also, rename the *.xml version:
cd ../alert
mv log.xml log_prod_`date '+%m%d'`.xml
0
Mushfique KhanDirector OperationsAuthor Commented:
thanks, especially markgeer, how about the #1 & #3, is there any fastest way to look for and got  alerted as soon as there is any ORA- error there?

And we have almost 17 instances running on each node, having 3 nodes cluster, please assist/advise/guide, how to accomplish this too.

Thanks in advance.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.