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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值