This discussion is archived
1 Reply Latest reply: Dec 7, 2012 10:29 AM by Niket Kumar RSS

why multiple backupSETS from simple backup command

EdStevens Guru
Currently Being Moderated
Oracle 10.2.0.4.0
Oracle Linux 5.6 x86-64

Given this backup script
$ORACLE_HOME/bin/rman target / <<EOF >>$logfile 2>&1
configure backup optimization on;
configure channel device type disk format '$BACKUP_LOC/%U.rman' MAXPIECESIZE 4096 M;
configure controlfile autobackup format for device type disk to '$BACKUP_LOC/%d_%F_ctl.backup';
configure controlfile autobackup on;
configure default device type to disk;
configure retention policy to recovery window of 2 days;
configure snapshot controlfile name to '$BACKUP_LOC/snapcf_hr91tst.f';
show all;
crosscheck backup;
crosscheck archivelog all;
delete noprompt force obsolete;
delete noprompt force expired backup;
delete noprompt force expired archivelog all;
# ------- only for cold backup
shutdown immediate;
startup mount;
backup as compressed backupset incremental level 0 database tag tag_$ORACLE_SID;
alter database open;
# -------- end only for cold backup
sql "alter database backup controlfile to trace as ''$BACKUP_LOC/${ORACLE_SID}_ctlfile_${datestring}.trc''";
list recoverable backup;
EOF
#
I see this interesting stuff from the acutal backup command
RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/oracle/backup/orcl/%d_%F_ctl.backup';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/u01/app/oracle/backup/orcl/%U.rman' MAXPIECESIZE 4096 M;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/backup/orcl/snapcf_hr91tst.f';

<snip>

Starting backup at 07-Dec-2012 05:30:26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=211 devtype=DISK
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
     <snip list of files and backup pieces >
channel ORA_DISK_1: backup set complete, elapsed time: 00:25:46
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
     <snip list of files and backup pieces >
channel ORA_DISK_1: backup set complete, elapsed time: 00:19:01
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset

     <snip more of same >

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
     <snip list of files and backup pieces >
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
     <snip list of files and backup pieces >
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-Dec-2012 06:41:10

Starting Control File and SPFILE Autobackup at 07-Dec-2012 06:41:10
piece handle=/u01/app/oracle/backup/orcl/orcl_c-4286206908-20121207-00_ctl.backup comment=NONE
Finished Control File and SPFILE Autobackup at 07-Dec-2012 06:41:14
and
List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time     
------- ---- -- ---------- ----------- ------------ --------------------
57      Incr 0  8.51G      DISK        00:25:37     07-Dec-2012 05:43:42

      <snip details of backup set>

BS Key  Type LV Size       Device Type Elapsed Time Completion Time     
------- ---- -- ---------- ----------- ------------ --------------------
58      Incr 0  5.54G      DISK        00:18:59     07-Dec-2012 06:01:36


      <snip more of same>


BS Key  Type LV Size       Device Type Elapsed Time Completion Time     
------- ---- -- ---------- ----------- ------------ --------------------
83      Incr 0  1.02M      DISK        00:00:00     07-Dec-2012 06:41:09

      <snip details of backup set>

BS Key  Type LV Size       Device Type Elapsed Time Completion Time     
------- ---- -- ---------- ----------- ------------ --------------------
84      Full    14.14M     DISK        00:00:01     07-Dec-2012 06:41:11

      <snip details of backup set>
So, as you can see, this one backup statement ended up createing 28 backup SETS. I understand the multiple backup pieces per set (snipped from above) as that would be controlled by 'MAXPIECESIZE 4096 M', but I don't understand why the multiple SETS.
  • 1. Re: why multiple backupSETS from simple backup command
    Niket Kumar Pro
    Currently Being Moderated
    backupSpec     A BACKUP specification list contains a list of one or more backupSpec clauses. A backupSpec clause minimally contains a list of one or more objects to be backed up.
    Each backupSpec clause generates one or more backup sets (AS BACKUPSET) or image copies (AS COPY). For AS BACKUPSET, the backupSpec clause generates multiple backup sets if the number of datafiles specified in or implied by its list of objects exceeds the default limit of 4 datafiles or 16 archived logs in each backup set.
    PLUS ARCHIVELOG     When you specify PLUS ARCHIVELOG, RMAN performs these steps:
    taken refrence from
    http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta009.htm

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points