Skip to Main Content
  • Questions
  • How to create an alert to monitor RMAN archive backup job that exceeds one hour runtime.

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Carla.

Asked: January 10, 2017 - 11:39 am UTC

Last updated: January 17, 2017 - 1:17 am UTC

Version: 11.2.0.4

Viewed 1000+ times

You Asked

Is there a SQL script, template or OEM alert that can send an email alert when a RMAN archive backup job exceeds one hour?

This is for a standalone 11.2.0.4 database running AIX 7.1. The OEM version we have is 12.1.0.5.

Thank you

and Connor said...

Something like this should do the trick:

SQL> select *
  2  from  v$rman_status
  3  where status like 'RUNNING%'
  4  and   start_time < sysdate - 1/24;


To turn it into an alert/metric in OEM, you could do a COUNT(*) and have a greater-than-zero condition.

Hope this helps.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Great answer - a little more detail for the alert/metric

Carla Bell, January 16, 2017 - 3:20 am UTC

Thank you Connor, this is great information. However, I'm not totally undersatnding the recommendation for the alert/metric.
Can you explain in more detail performing a count(*) for the alert/metric?

Thank you very much.
Connor McDonald
January 17, 2017 - 1:17 am UTC

In Enterprise Manager, you can define your own metric/alerts.

Just like (for exampe) the default tablespace usage metric is "more than 85% = raise an alert", you can define your own metrics, which is defined by your own SQL statement.

So you could have a metric:

"RMAN excessive duration"

defined by (say):

select count(*) from v$rman_status where status like 'RUNNING%' and start_time < sysdate - 1/24;

with a threshold set to: "> 0" = raise alert



More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.