RMAN Script Scheduling in Windows Server
First Create your scirpts in suppose D:\orascripts\rman location like below
1. rman_full_bkp_SHAONDB.bat
the content of this file will be
2. rman_full_bkp.bat
Finally you just open windows task scheduler
Control Panel-->All Control Panel Items-->Administrative Tools-->task scheduler
create a new task where the action will be batchfile#1.
That's it.
1. rman_full_bkp_SHAONDB.bat
the content of this file will be
set ORACLE_HOME=D:\app\orabase\product\11.2.0\dbhome_1
set ORACLE_SID=DBSHAON
%ORACLE_HOME%\bin\rman target / cmdfile='D:\orascripts\rman\rman_full_bkp.bat' log='D:\orascripts\rman\rman_archive_full_bkp_cronout.txt'
2. rman_full_bkp.bat
run {
backup database plus archivelog;
delete obsolete;
}
exit
Finally you just open windows task scheduler
Control Panel-->All Control Panel Items-->Administrative Tools-->task scheduler
create a new task where the action will be batchfile#1.
That's it.
Thanks for your post.
ReplyDeleteYou have used ".bat" extension for your RMAN command file. Is there any specific reason ?
Thanks Obaid for reading the post.
ReplyDeleteYah. I have tried the cmd file with extension .txt and .sql but both don't work. So I kept it in .bat format which worked without any error.