Labels

Thursday, March 6, 2014

Oracle 12c Multisection Incremental backup

Starting with Oracle Database 12Release 1 (12.1), RMAN supports multisection incremental backups. Wherever applicable, RMAN also uses unused block compression and block change tracking while creating multisection incremental backups. When backup sets are used, you can create multisection full or incremental backups.

To create level 0 multisection incremental backups, the COMPATIBLE parameter must be set to 11.0 or higher. However, to create multisection incremental backups of level 1 or higher, you must set the COMPATIBLE parameter to 12.0.0 or higher. RMAN always creates multisection incremental backups withFILESPERSET set to 1.

The SECTION SIZE clause specifies the size of each backup section. If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backups for that file.

Multisection Incremental Backup of Database as Backup Sets
SQL> select name from v$database;

NAME
---------
ORA12C
SQL> show user
USER is "SYS"
SQL> create user c##x identified by c##x;

User created.
SQL> grant sysbackup to c##x;

Grant succeeded.

SQL> grant connect,resource to c##x;

Grant succeeded.
C:\Users\xxxxxx>rman target 'c##x@ORA12C as sysbackup'

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Mar 6 16:47:51 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

target database Password:
connected to target database: ORA12C (DBID=218350063)
RMAN> CONFIGURE DEVICE TYPE disk PARALLELISM 2;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored

RMAN> backup incremental level 1 section size 300m datafile 'C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF';

Starting backup at 06-MAR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=267 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=34 device type=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF
backing up blocks 1 through 38400
channel ORA_DISK_1: starting piece 1 at 06-MAR-14
channel ORA_DISK_2: starting incremental level 1 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF
backing up blocks 38401 through 76800
channel ORA_DISK_2: starting piece 2 at 06-MAR-14
channel ORA_DISK_1: finished piece 1 at 06-MAR-14
piece handle=C:\APP\XXXXXX\RECOVERY_AREA\ORA12C\BACKUPSET\2014_03_06\O1_MF_NNND1_TAG20140306T165137_9KJPL2B2_.BKP tag=TAG20140306T165137 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:31
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF
backing up blocks 76801 through 98560
channel ORA_DISK_1: starting piece 3 at 06-MAR-14
channel ORA_DISK_2: finished piece 2 at 06-MAR-14
piece handle=C:\APP\XXXXXX\RECOVERY_AREA\ORA12C\BACKUPSET\2014_03_06\O1_MF_NNND1_TAG20140306T165137_9KJPWFGG_.BKP tag=TAG20140306T165137 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_1: finished piece 3 at 06-MAR-14
piece handle=C:\APP\XXXXXX\RECOVERY_AREA\ORA12C\BACKUPSET\2014_03_06\O1_MF_NNND1_TAG20140306T165137_9KJPWKS0_.BKP tag=TAG20140306T165137 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 06-MAR-14

Starting Control File and SPFILE Autobackup at 06-MAR-14
piece handle=C:\APP\XXXXXX\RECOVERY_AREA\ORA12C\AUTOBACKUP\2014_03_06\O1_MF_S_841510637_9KJPWP6R_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 06-MAR-14



Making Multisection Backups Using Image Copies
While the image copy is being created, multiple channels are used to write files sections. However, the output of this operation is one copy for each data file. If the section size that you specify is larger than the size of the file, then RMAN does not use multisection backups for that file.

Ensure that the COMPATIBLE parameter for the target database is set to 12.0.0 or higher.
RMAN> BACKUP AS COPY SECTION SIZE 500M DATABASE;

Starting backup at 06-MAR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=267 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=32 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF
backing up blocks 1 through 64000
channel ORA_DISK_2: starting datafile copy
input datafile file number=00003 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSAUX01.DBF
backing up blocks 1 through 64000
level 1 incremental backup of image copy.

RMAN> RUN {
   RECOVER COPY OF DATABASE WITH TAG 'incr_update';
   BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update' section size 500m
       DATABASE;
   }
Starting backup at 06-MAR-14
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSTEM01.DBF
backing up blocks 1 through 64000
channel ORA_DISK_1: starting piece 1 at 06-MAR-14
channel ORA_DISK_2: starting incremental level 1 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=C:\APP\XXXXXX\ORADATA\ORA12C\SYSAUX01.DBF
backing up blocks 1 through 64000
channel ORA_DISK_2: starting piece 1 at 06-MAR-14
channel ORA_DISK_1: finished piece 1 at 06-MAR-14
piece handle=C:\APP\XXXXXX\RECOVERY_AREA\ORA12C\BACKUPSET\2014_03_06\O1_MF_NNND1_INCR_UPDATE_9KJSKMP
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:17
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set


No comments:

Post a Comment