How to run the rman backup from scheduler

Step 1 : Create a directory name RMAN_BKP in the E drive
E:\RMAN_BKP

Step 2 : Create a batch file rman.bat with the following contents and store it in the E:\RMAN_BKP folder
C:\oracle\product\10.2.0\db_1\BIN\rman target sys/sys123@orcl cmdfile='E:\RMAN_BKP\backup.rcv' log='E:\RMAN_BKP\bkup_log.log'

Step 3:Write a script for rman to take backup in a file backup.rcv and store it in the E:\RMAN_BKP folder
run{
allocate channel t1 type disk;
allocate channel t2 type disk;
backup database format 'F:\RMAN_BKP\datafile_%d_%u_%s';
backup current controlfile format 'F:\RMAN_BKP\Contfile_%d_%u_%s';
release channel t1;
release channel t2;
}

Step 4: Now double click on the batch file to the run rman backup

You can add the rman.bat file into windows scheduler to automatically run the rman backup in any particular time.

Hope it will work......

Comments

Popular Posts