1.Specifying Backup Windows using duration clause of backup statement. If the backup is not able to complete within the window the operation will fail. To avoid any other operation within the run block to complete we will use partial with the duration clause.
RMAN> run
2> {
3> backup
4> as backupset
5> duration 0:01
6> tag="backup_with_duration"
7> database;
8> sql "alter system archive log current";
9> }
Starting backup at 15-MAY-2014 06:20:22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/cvrman/datafile/system.256.847354793
input datafile file number=00004 name=+DATA/cvrman/datafile/users.259.847354795
channel ORA_DISK_1: starting piece 1 at 15-MAY-2014 06:20:24
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/cvrman/datafile/example.308.847525493
input datafile file number=00003 name=+DATA/cvrman/datafile/undotbs1.258.847354795
channel ORA_DISK_2: starting piece 1 at 15-MAY-2014 06:20:25
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/cvrman/datafile/sysaux.257.847354793
input datafile file number=00006 name=+DATA/cvrman/datafile/tbs1.294.847433665
channel ORA_DISK_3: starting piece 1 at 15-MAY-2014 06:20:25
channel ORA_DISK_2: finished piece 1 at 15-MAY-2014 06:21:21
piece handle=+DATA/cvrman/backupset/2014_05_15/nnndf0_backup_with_duration_0.304.847606833 tag=BACKUP_WITH_DURATION comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:56
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/15/2014 06:21:31
ORA-19591: backup aborted because job time exceeded duration time
continuing other job steps, job failed will not be re-run
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_3 channel at 05/15/2014 06:21:31
ORA-19591: backup aborted because job time exceeded duration time
2. If Job time exceeded the duration time with Partial in the duration clause, further backup will be cancelled and next statement in the run block will complete.
RMAN> run
2> {
3> backup
4> as backupset
5> duration 0:01 partial
6> tag="backup_with_duration"
7> database;
8> sql "alter system archive log current";
9> }
Starting backup at 15-MAY-2014 06:29:14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/cvrman/datafile/system.256.847354793
input datafile file number=00004 name=+DATA/cvrman/datafile/users.259.847354795
channel ORA_DISK_1: starting piece 1 at 15-MAY-2014 06:29:16
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/cvrman/datafile/sysaux.257.847354793
input datafile file number=00006 name=+DATA/cvrman/datafile/tbs1.294.847433665
channel ORA_DISK_2: starting piece 1 at 15-MAY-2014 06:29:17
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/cvrman/datafile/example.308.847525493
input datafile file number=00003 name=+DATA/cvrman/datafile/undotbs1.258.847354795
channel ORA_DISK_3: starting piece 1 at 15-MAY-2014 06:29:18
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/15/2014 06:30:23
ORA-19591: backup aborted because job time exceeded duration time
backup of datafile 1 was cancelled
backup of datafile 4 was cancelled
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 05/15/2014 06:30:23
ORA-19591: backup aborted because job time exceeded duration time
backup of datafile 2 was cancelled
backup of datafile 6 was cancelled
channel ORA_DISK_3: finished piece 1 at 15-MAY-2014 06:30:23
piece handle=+DATA/cvrman/backupset/2014_05_15/nnndf0_backup_with_duration_0.309.847607371 tag=BACKUP_WITH_DURATION comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:01:05
Finished backup at 15-MAY-2014 06:30:23
sql statement: alter system archive log current
No comments:
Post a Comment