Arun Kumar
Schedule RMAN Backup on Windows
Scheduling RMAN backups on a windows machine is little different than Linux machine. Windows uses bash shell and windows scheduler to automate RMAN backups.
Create RMAN Backup Script File
We will create a backup.cmd file with our RMAN run block for database backup
run{
crosscheck backup;
backup database plus archivelog;
};
Create Bash Shell
Create a proddb_rman_backup.bat (.bat is a windows bash shell) file which will call above file
set oracle_sid=proddb
rman target sys/sys@ecccatalog rman_rc/rman_rc@rcat cmdfile='F:\backup.cmd' log='F:\rman_backup_full\backup.log'
Add Schedule to Windows Scheduler
Schedule the above .bat script in windows scheduler
Launch the Task Scheduler from start menu
On the right-hand panel, click on Create Task

Give a name to your task

Click on Triggers tab >> New and define the schedule

Make sure you set proper frequency like daily or weekly and set proper start date and time. Click on Actions tab >> New and provide the location of .bat file you created

Click on OK and task will be created. You can even run the task for testing by right clicking on the task name and select Run
