RMAN backup 脚本的修改。

我原来的备份脚本是:

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:

  1. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.

  2. 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.

  3. Backs up the rest of the files specified in BACKUP command.

  4. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.

  5. 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.

你可能感兴趣的:(backup)