我原来的备份脚本是:
run {
set command id to 'ARSPRD_F';
backup database;
backup archivelog all delete all input;
}
修改后是:
run {
set command id to 'ARSPRD_F';
backup database
plus archivelog delete all input;
}
Actually the plus archivelog equal to
run{
set command id to 'ARSPRD_F';sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup database;sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup archivelog all delete all input;}Reference: http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup003.htm
4.3.7.2 Backing Up Logs with BACKUP ... PLUS ARCHIVELOG
You can add archived redo logs to a backup of other files by using the BACKUP ... PLUS ARCHIVELOG clause. Adding BACKUP ... PLUS ARCHIVELOG causes RMAN to do the following:
-
Runs the
ALTERSYSTEMARCHIVELOGCURRENTcommand. -
Runs
BACKUPARCHIVELOGALL. Note that if backup optimization is enabled, then RMAN skips logs that it has already backed up to the specified device. -
Backs up the rest of the files specified in
BACKUPcommand. -
Runs the
ALTERSYSTEMARCHIVELOGCURRENTcommand. -
Backs up any remaining archived logs generated during the backup.
This guarantees that datafile backups taken during the command are recoverable to a consistent state.
本文介绍了一种改进的RMAN备份脚本,通过使用BACKUP...PLUS ARCHIVELOG指令来确保数据文件备份期间的一致性和可恢复性。修改后的脚本能够更有效地管理归档日志,并详细解释了其工作原理。
940

被折叠的 条评论
为什么被折叠?



