rman backup logs - find the lastes for all databases and check status

on one system I have 4 databases that are backed up by rman.

I need to tail the latest log for each of these to get the status and email the output
the rman logs have the date timestamp so the name changes every time it is run.

ie  databasename_bkupdd_FULL.20130908-18:00:00.log

I only want the FULL backups not the LONG or the LOG backup file

so I need help putting a unix script together for this
Who is Participating?
DavidConnect With a Mentor Senior Oracle Database AdministratorCommented:
Whether you're using cron, or the OEM jobs scheduler, you should be able to append the mail-tail statement when the rman step is complete.  Obviously the syntax varies by O/S and your method, but I'm thinking a bash script with:
<capture system timestamp to variable XX>
rman ..... log=...XX.log
mailx subject=rmanlog oper@somedomain < tail -100 ...XX.log

A side point, not what you asked -- but is that technique your best way to automate the logging -- as it implies someone is expected to manually read the results of each run.  I'd steer you toward logging the job completion to something like syslog, and using email only to flag exceptions / errors.  You'll find examples of both in the E-E search engine.
bkreynolds48Author Commented:
the automated logging of the job goes to the oncall person.
I have a requirement that says I have to check these daily on my assigned system
thus the request for a script
bkreynolds48Author Commented:
I've requested that this question be deleted for the following reason:

I figured out how to do this myself - since no one responded with a good answer
DavidSenior Oracle Database AdministratorCommented:
I believe I provided a sufficiently clear solution to the stated problem.  The asker implies that the only answer (mine) was no good, but did not provide any comment with which we could continue the exchange.  Secondly, the asker has not yet detailed his/her solution in the thread.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.