Solved

need an email alert when a oracle rman backup / restore job completes or fails

Posted on 2014-02-06
2
1,732 Views
Last Modified: 2014-02-06
im using RMAN for backup / restore to a data domain box
i would like some sort of email alert that sends an email when the job completes or fails
oracle 11g
0
Comment
Question by:dougdog
2 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 total points
ID: 39838718
I wrote my own procedure that checks everything in my database I consider 'important'.

Once of these things is what datafiles RMAN last backed up (I figure if the datafiles were backed up, everything else in my RMAN script was).

It then uses UTL_MAIL to email me every morning.

You could add anything from any of the V$ views RMAN uses to get as detailed as you want.

You can also use UTL_SMTP instead of UTL_MAIL.  Some Experts here don't like UTL_MAIL.

RMAN views:
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcviews001.htm#RCMRF1923

UTL_MAIL:
docs.oracle.com/cd/E11882_01/appdev.112/e40758/u_mail.htm
0
 
LVL 36

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 250 total points
ID: 39838723
this requires a little work:

install XDB package in the oracle database
set the necessary ACL priviliges to the smtp server for that user
add a trigger on V$RMAN_BACKUP_JOB_DETAILS column STATUS when it gets updated to FAILED or COMPLETED
and call a mail procedure with the info

sdstuber wrote articles covering all these topics except the trigger on V$RMAN_BACKUP_JOB_DETAILS

October 28, 2011: How to use Access Control Lists in Oracle (part 1)
http://www.experts-exchange.com/A_8429.html

September 18, 2011: How to send email attachments with Oracle
http://www.experts-exchange.com/A_7749.html
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now