windows rman backup

1)create a file named cmdfile.txt

RUN {

      ALLOCATE CHANNEL ch1 TYPE DISK;

       BACKUP DATABASE FORMAT 'G:\rman\pgsspc\full_%d_%T_%s';

       backup archivelog all tag='arch_bak' format 'G:\rman\pgsspc\arch_%s_%p_%T' ;

       delete noprompt archivelog until time 'sysdate -7';

       backup current controlfile tag='ctlfile_bak' format='G:\rman\pgsspc\ctlfile_%d_%T';

       backup spfile tag='spfile_bak' format='G:\rman\pgsspc\spfile_%d_%T';

      RELEASE CHANNEL ch1;

    }

EXIT;

2)Full_backup.bat

rman target / nocatalog @D:\oracle\script\cmdfile.txt log=D:\oracle\script\full_backup.log

3) 开始--》控制面板--》任务计划

 

posted on 2011-01-28 15:15  Alex.Zhang  阅读(309)  评论(0编辑  收藏  举报