测试通过:
一个星期7天的全备份。
bat文件(rman.bat)内容:
@echo off
set oracle_sid=orcl10
set oraclepath="D:\oracle\product\10.2.0\db_1\BIN"
%oraclepath%\rman target / msglog E:\DB_backup\Oracle_DB\rmanlog\%date:~0,10%.log cmdfile=E:\DB_backup\Oracle_DB\sql.rman
sql.rman内容:
RUN {
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:/DB_backup/Oracle_DB/%F';
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK FORMAT 'E:/DB_backup/Oracle_DB/%U';
BACKUP DATABASE SKIP INACCESSIBLE FILESPERSET 10
PLUS ARCHIVELOG FILESPERSET 20
DELETE ALL INPUT;
RELEASE CHANNEL CH1;
}
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;
CROSSCHECK BACKUPSET;
DELETE NOPROMPT OBSOLETE;
阅读(4184) | 评论(0) | 转发(0) |