Re: RMAN on Windows Server
Date: Tue, 1 Dec 2009 07:15:07 -0800 (PST)
Are you using Database control or grid control? They will automate this for you using the Oracle Scheduler. Of course, if your shutting down your database from time to time then the database scheduler would not be able to run the backups.
You can also look at the schtasks scheduler or at (I prefer schtasks) to schedule the batch files. A simple RMAN backup batch file (usual disclaimers about testing, I'm not responsible for the results of this file, etc) would look something like this:
rem RMAN BACKUP SCRIPT
rem For WIN XP
if "%2" == "backup" rman target=/ cmdfile=backup.scr if not ERRORLEVEL 0 echo "WARNING - FAILURE OCCURED"
if "%2" == "arch" rman target=/ cmdfile=arch.scr if not ERRORLEVEL 0 echo "WARNING - FAILURE OCCURED"
and the scheduling would look like this:
schtasks /create /tn "database_backup" /sc daily /st 14:50:00 /tr "c:\bc\rman\backup.bat rob10r2 backup>>c:\bc\rman\backup.output" schtasks /delete /tn "database_backup"
schtasks /create /tn "archivelog_backup" /sc daily /st 14:45:00 /tr "c:\bc\rman\arch.bat rob10r2 arch>>c:\bc\rman\backup.output"
and the scr command files would be something like this (this assumes you have pre-configured channels, etc):
- backup.scr backup database channel c1 plus archivelog delete input;
- arch.scr backup archivelog all channel c1 delete input;
Robert G. Freeman
Ask me about on-site Oracle Training! RMAN, DBA, Tuning, you name it! Author:
Oracle Database 11g RMAN Backup and Recovery (Oracle Press) - ON IT'S WAY SOON! OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex) Oracle Database 11g New Features (Oracle Press) Oracle Database 10g New Features (Oracle Press) Other various titles
From: Bill Zakrzewski <bill_at_intactus.com> To: "Oracle-L_at_freelists.org" <oracle-l_at_freelists.org> Sent: Tue, December 1, 2009 8:03:17 AM
Subject: RMAN on Windows Server
I was just given a database to maintain on Windows, does anyone have a basic RMAN backup script that I can alter to automate an RMAN backup on Windows? I usually work on Linux or Unix and not really familiar with scripting on a Windows server. Any advice on automating the script will be helpful too.
Windows Server 2003 SP2
Thanks in advance,