我原来的备份脚本是:
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
ALTER
SYSTEM
ARCHIVE
LOG
CURRENT
command. -
Runs
BACKUP
ARCHIVELOG
ALL
. 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
BACKUP
command. -
Runs the
ALTER
SYSTEM
ARCHIVE
LOG
CURRENT
command. -
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.