RMAN Backup Script for Windows
Create Batch file named as rmanbackup.cmd and copy the below given script in that batch file.
set oracle_sid=orcl
rman target sys/passwd nocatalog cmdfile=’c:\app\rman\rmanbkp.cmd’ log=’c:\app\rman\bkp_log.log’
—————
–rmanbackup.cmd
run
{
allocate channel d1 type disk;
backup
tag whole_database_open
format ‘c:\app\archive\db_%t_%s_p%p’
database;
sql ‘alter system archive log current’;
sql ‘alter system archive log current’;
backup archivelog all
format ‘c:\app\archive\al_%t_%s_p%p’
delete all input;
delete noprompt obsolete;
backup current controlfile
tag =cf1
format ‘c:\app\archive\cf_%t_%s_p%p’;
}