现在的位置: 首页 > 综合 > 正文

rman备份脚本,在windows下

2013年11月25日 ⁄ 综合 ⁄ 共 408字 ⁄ 字号 评论关闭

set rq=%date:~-10%
rman target 'sys/syspassword@target as sysdba' catalog rman/rmanpassword@catalog @'D:/lxj/backup.sql'  log d:/lxj/lxj%rq%.log 

backup.sql文件的内容如下:
run { 
allocate channel Channel1 type disk format 'D:/backup/b_%u_%p_%c';
backup  
   ( database  include current controlfile );

backup  ( archivelog all  not backed up 8 times );

}
allocate channel for maintenance device type disk;
delete archivelog until time 'sysdate - 10' backed up 8 times to disk;

抱歉!评论已关闭.