Solved

RMAN- backup schedule

Posted on 2004-08-20
6
3,721 Views
Last Modified: 2008-01-09
Hello Experts,

I am implementing an automated rman backup procedure for an Oracle database. Say I want to perform a full backup every monday. How do one schedule it? Through dbms_job system or operating system scheduler? Which one is preferred

Assume I am using the following command to backup the database.
backup database format 'c:\rman_backups\%d_%t';

Can someone tell how do I schedule it using windows task scheduler and dbms_job system?
Is there a way to get email notification everytime a backup completes or the log of error when it fails.
I can use "rman cmdfile logfile" to run the commands in cmdfile. But how do I have the contents of logfile emailed to me?

What are the best practices?
Thanks much,
IIT
0
Comment
Question by:iit
  • 3
6 Comments
 

Author Comment

by:iit
ID: 11857283
Some more information:

I can put commands such as this in a command file:

run
      allocate channel t1 type `SBT_TAPE`
      parms `ENV=(NSR_SERVER=jupiter.legato.com)`;
      backup
      filesperset 6
      (database format `test-%s_%p`);
      }

and the rman command to execute the cmd file in a batch file and then give the batch file as input to the schduler.
rman80 target internal/oracle rcvcat rman/rman@mars \
      cmdfile `f:\orant\scripts\rmanscript`2>&1 >rmanlog
      savegrp -O -l full -c Oracle8-server-name -c NetWorker-server-name

This way for every kind of backup to be scheduled i have to create two scripts. I am thinking this becomes aproblem to manage and assuming there might be a better way to deal with it... using dbms_job system or so...

thanks in advance for your help!!
0
 

Author Comment

by:iit
ID: 11859213
I have done little more research on performing automated backups using Enterprise Manager,

I found the chapter Managing Backup and Recovery in Oracle Enterprise Manager Administrator's Guide Release 9.2.0 guide very useful. It looks like I have to run OMS to use the backup and recovery. I have to study more about OMS, advantages/disadvantages complexity etc. I am handling just a couple of small databases. So I have to figure out which method is good for my case.

Thanks in advance for any pointers!!
0
 
LVL 4

Accepted Solution

by:
andertst earned 50 total points
ID: 11861756
I'm not a big fan of Windows for Oracle databases.  I realize it will work perfectly well for some uses, just not my favorite.  That is probably why I would recommend using DBMS_JOB.  Also, that will prevent you from having cases where the host is running and the database is not where the backup runs.

But, since you said "full backup", I just have to mention that if it is a "closed db backup" I don't know if scheduling it inside the db is a good idea.  I would stick with an incremental level 0 (which is a full backup) as long as you are in archivelog mode.

Stephen
0
 

Author Comment

by:iit
ID: 11869953
Thank you anderst for your comments.

>>That is probably why I would recommend using DBMS_JOB.
Can we run rman scripts using dbms_job? My understanding is that I have to configure Oracle Management Server to run it. I heard it is technically possible to run rman scripts using dbms_job using java stored procedures (dont't know how). Please tell me if my understanding is incorrect.

Thanks again!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

911 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

21 Experts available now in Live!

Get 1:1 Help Now