Skip to main content
RMAN

RMAN 12c New Feature – Multi-Section Backup

By April 5, 2015September 12th, 2016No Comments

In Oracle 12c, there are many features and improvements in RMAN – Recovery Manager. One of the improvements is RMAN Multi-Section Backup. In this article, I have explained about this Multi-Section backup and it’s enhancements.

 

Multi-Section Backup Improvements

  • Multi-Section option was introduced in Oracle 11g to handle large Datafiles backups.
  • Using this option RMAN can split up or break up a large file into sections during the backup and recovery.
  • This improves the performance of backup and recovery of a large Datafiles.

Multi-Section option can be used in Oracle 11g for the below,

  • Backup using Backup sets.
  • Full Backups using Backup sets.
  • Incremental  level 0 backups using Backup sets.

 

Multi-Section option can be used in Oracle 11g for the below,

  • SECTION SIZE is the keyword used and each channel will create separate files within the backup sets and backup the database in parallel.
  • This option can only be used to backup the Datafiles.
  • We can not use this option to backup the Control Files.

 

In the below example, I am trying to take a backup copy of a datafile with datafile ID 5.

 

SQL> select file_id,file_name,bytes/1024/1024 size_mb from dba_data_files where file_id=5;FILE_ID        FILE_NAME                                                                         SIZE_MB
———–       ———————————————————————      —————    
   5                +DATA_GRP/proddb/datafile/example.265.848660933      345.625

But it clearly ended with the error saying that this option is not available with “AS COPY”

 

RMAN> backup as copy section size 100M datafile 5;Starting backup at 22-FEB-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=52 device type=DISK
RMAN-00571: =================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS======
RMAN-00571:=================================================
RMAN-03002: failure of backup command at 02/22/2015 18:08:14
RMAN-06580: the SECBYTES option cannot be used with AS COPY

 

From Oracle 12c RMAN, Multisection Backups are supported for the below.,

  1. Backup using Backup sets and Image Copies.
  2. Full Backups using Backup sets and Image Copies.
  3. Incremental  level 0 backups and higher than level 0

 

A very important point to note here is,

If we specify the SECTION SIZE larger than the actual Datafile size, then RMAN does not use the Multi-Section option.

 

The following command creates a Multi-Section backup of the database using image copies,

BACKUP AS COPY SECTION SIZE 500M DATABASE;

 

The following command creates Multi-Section level 1 incremental backup,

BACKUP INCREMENTAL LEVEL 1 SECTION SIZE 500M DATABASE;

 

So now I am going to take a backup copy of a datafile using Multi-Section option.

SQL> select file_id,file_name,bytes/1024/1024 size_mb from dba_data_files where file_id=2;FILE_ID        FILE_NAME                                                                         SIZE_MB
———–       ———————————————————————      —————    
   2                /vol1/oradata/RMANDB/example01.dbf                             358.125

 

RMAN> backup as copy section size 100M datafile 2;Starting backup at 22-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=44 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 1 through 12800
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmoq5kt_.dbf tag=TAG20150222T184725
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 12801 through 25600
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmoq5kt_.dbf tag=TAG20150222T184725
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 25601 through 38400
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmoq5kt_.dbf tag=TAG20150222T184725
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:04
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 38401 through 45840
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmoq5kt_.dbf tag=TAG20150222T184725
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 22-FEB-15

In the above example, the datafile 2 is of size 358 MB. I have specified to take backup of this datafile with section size 100 MB each. Here the datafile is split in to 4 parts.

Section1 – 1 through 12800 – 100 M

Section2 – 12801 through 25600 – 100 M

Section3 – 25601 through 38400 – 100 M

Section4 – 38401 through 45840 – 58 M (Remaining Size)

The backup of the Datafile 2 has been taken as 4 Sections. It has been highlighted in Red colour. But here only one channel is spawned or allocated.

 

So what happens when we set PARALLELISM? How Multi-Section backups are handled when using PARALLELISM?

 

Here is another example where I had configured my default parallelism to 4. So when I take backup, 4 channels are used in parallel.

RMAN> configure device type disk parallelism 4 backup type to backupset;new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1

 

I am going to take backup of the same datafile 2 and let us see how it works.,

RMAN> backup as copy section size 100M datafile 2;Starting backup at 22-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=44 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=40 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=43 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=58 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 1 through 12800
channel ORA_DISK_2: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 12801 through 25600
channel ORA_DISK_3: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 25601 through 38400
channel ORA_DISK_4: starting datafile copy
input datafile file number=00002 name=/vol1/oradata/RMANDB/example01.dbf
backing up blocks 38401 through 45840
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmp0psq_.dbf tag=TAG20150222T185230
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmp0psq_.dbf tag=TAG20150222T185230
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:07
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmp0psq_.dbf tag=TAG20150222T185230
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:00:07
output file name=/oracle/fast_recovery_area/RMANDB/datafile/o1_mf_example_bgmp0psq_.dbf tag=TAG20150222T185230
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:00:07
Finished backup at 22-FEB-15

Here in the above output, 4 channels are allocated and each channel has handled each section and taken the backup.

 

Hope this post is helpful..!!! I have also written about the “Table Recovery” one of the RMAN 12c new feature. Please find the below link.,

https://www.oracle-scn.com/table-recovery-in-rman-12c/

 

Leave a Reply