[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 725
  • Last Modified:

RMAN Recipes for Oracle 8i on Windows

Okay so I'm trying to help a friend who's set up at work is still on 8i on Windows 2000 server.  They don't plan to upgrade as they are actually planning to switch databases soon.  But for now, he needs help implementing an automated backup plan.  Let's say level 0 backup on Sunday, level 1 on Tuesdays on Thursdays, then archivelog backup on the other days.  Additionally, we want to purge the archivelogs during the level 0 backup.  If this was at least 10g and on Linux, I wouldn't have a problem.  However I need to research a bit more on 8i.  So far I've been able to create the catalog and make a full backup.  

One thing I don't have any idea of is the equivalent of cron/scheduled jobs in Windows 2000 server.

Note that I know where to look for the solution (Oracle documentation, etc), but I would like to do this quickly so would appreciate if you can share your recipes for this requirement.  Assume write the backup to internal disk only.

Thanks.

0
johanntagle
Asked:
johanntagle
  • 4
  • 3
  • 2
4 Solutions
 
manzoor_dbaCommented:
Hi,

In Widows we have task scheduler which is used to schedule a program to run on a scheduled time, here you can create a bat file which contains the scripts to connect to the database through rman takes the backup...

Thanks..
0
 
manzoor_dbaCommented:
hi,

You can find this in control panel named as scheduled task.

Thanks..
0
 
johanntagleAuthor Commented:
Thanks manzoor_dba!  Ok it seems I have that part covered, but I guess I'll really have to research on the RMAN recipes myself.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mrjoltcolaCommented:
Note you don't need a recovery catalog, but it is a good practice.

Anyway, the 8i docs give you plenty of samples...

http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76990/usingrma.htm#434145

For incrementals, start with a weekly level 0 on Sunday. This will also archive the current log(s) after the backup, then backup the current logs.

run {
  allocate channel c1 type disk;
  backup incremental level 0 database tag weekly_sunday_lev0;
  sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
  backup current controlfile;
  backup archivelog all delete input;
}

Open in new window


Then run this nightly during week; gets an incremental since last level 0, plus control file and archives

run {
  allocate channel c1 type disk;
  backup incremental level 1 database;
  sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
  backup current controlfile;
  backup archivelog all delete input;
}

Open in new window




0
 
johanntagleAuthor Commented:
Thanks MrJoltCola!  Just give me time to setup my local test environment to try them out and then will give you feedback.
0
 
mrjoltcolaCommented:
Welcome.

1 more note, personally I don't use the "delete input" option for backing up archives because I prefer to keep a lot of archive log online an ready for restore. I run a separate script to cleanup archive, anything older than 30 days usually.
0
 
johanntagleAuthor Commented:
I was thinking actually the same thing.  What's the equivalent of "delete archivelogs all completed before 'sysdate - 30'" in 8i?
0
 
mrjoltcolaCommented:
Try: change archivelog until time 'sysdate - 30' delete;
0
 
johanntagleAuthor Commented:
Thanks again!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now