Category - RMAN

RMAN Practices - PART 1- Back to Basics

RMAN  Practices - PART 1- Back to Basics

In below article i will be discussing on basic topics of RMAN Backups.

1=> Backup set & Image Copies.

Backup set

RMAN can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN backup.
By default, RMAN creates backup sets regardless of whether the destination is disk or a media manager.
A backup set contains the data from one or more data files, archived redo logs, control files, or server parameter file.
Backup sets, which are only created and accessed through RMAN, are the only form in which RMAN can write backups to media managers such as tape drives and tape libraries.
A backup set contains one or more binary files in an RMAN-specific format. 
Each of these files is known as a backup piece.
A backup set can contain multiple data files.
For example, you can back up 10 data files into a single backup set consisting of a single backup piece.
In this case, RMAN creates one backup piece as output.
One backupset must contain atleast 1 datafile in whole.

[oracle@racsetn1 bkp]$ rman target /

RMAN> report schema;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name TNT

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    910      SYSTEM               YES     +DATA/TNT/DATAFILE/system.282.1115902991
3    570      SYSAUX               NO      +DATA/TNT/DATAFILE/sysaux.283.1115903017
4    335      UNDOTBS1             YES     +DATA/TNT/DATAFILE/undotbs1.284.1115903031
5    50       UNDOTBS2             YES     +DATA/TNT/DATAFILE/undotbs2.290.1115904057
7    5        USERS                NO      +DATA/TNT/DATAFILE/users.285.1115903033

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    35       TEMP                 32767       +DATA/TNT/TEMPFILE/temp.289.1115903147
RMAN> exit
Recovery Manager complete.

Let we take backup of datafile 1 as backup set.

[oracle@racsetn1 ~]$ rman target /
connected to target database: TNT (DBID=1427195521)

RMAN>   
  run
{
backup as BACKUPSET  datafile 1 format '/ora_home/bkp/file_1_%U';
}

RMAN> 2> 3> 4> 
Starting backup at 26-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=154 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=411 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=31 instance=TNT1 device type=DISK
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/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_1: starting piece 1 at 26-SEP-22
channel ORA_DISK_1: finished piece 1 at 26-SEP-22
piece handle=/ora_home/bkp/file_1_4418mv9q_1_1 tag=TAG20220926T173657 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 26-SEP-22

Starting Control File and SPFILE Autobackup at 26-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_26/s_1116437821.767.1116437823 comment=NONE
Finished Control File and SPFILE Autobackup at 26-SEP-22

RMAN> 

[oracle@racsetn1 bkp]$ rman target /

connected to target database: TNT (DBID=1427195521)

RMAN> run
{
backup datafile 1 format '/ora_home/bkp/file_1_%U';
}
2> 3> 4>
Starting backup at 24-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=406 instance=TNT1 device type=DISK
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/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_1v18i544_1_1 tag=TAG20220924T214540 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116279944.772.1116279945 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

Let we check Size for this Backup set,

[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp/file_1_1v18i544_1_1
793M /ora_home/bkp/file_1_1v18i544_1_1
[oracle@racsetn1 bkp]$ 

Image Copies

An image copy is an exact copy of a single data file, archived redo log file, or control file.

Image copies are not stored in an RMAN-specific format.
They are identical to the results of copying a file with operating system commands.
RMAN can use image copies during RMAN restore and recover operations, and you can also use image copies with non-RMAN restore and recovery techniques.

To create image copies and have them recorded in the RMAN repository, you run the RMAN BACKUP AS COPY command.
Compression can not be used with rman image copies.

Let we take backup of datafile 1 as Image copy.

RMAN> run
{
backup as copy datafile 1 format '/ora_home/bkp/file_1_%U';
}

2> 3> 4>
Starting backup at 24-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/TNT/DATAFILE/system.282.1115902991
output file name=/ora_home/bkp/file_1_data_D-TNT_I-1427195521_TS-SYSTEM_FNO-1_2118i551 tag=TAG20220924T214609 RECID=2 STAMP=1116279971
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116279973.771.1116279975 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

RMAN>
RMAN> exit

Let we check Size for this Backup set,

[oracle@racsetn1 bkp]$ du -sh file_1_data_D-TNT_I-1427195521_TS-SYSTEM_FNO-1_2118i551
911M file_1_data_D-TNT_I-1427195521_TS-SYSTEM_FNO-1_2118i551
[oracle@racsetn1 bkp]$ 

So as we can see Image copy is Block-by-Block copy of datafile and hence size is same as original datafile , whereas for backup set size is reduced.

2=> MAXPIECESIZE & MAXSETSIZE

About Number and Size of RMAN Backup Sets

You use the backup clause of the BACKUP command to specify the objects to be backed up. Each backup clause produces at least one backup set.

You can influence RMAN behavior with the MAXSETSIZE parameter in the CONFIGURE or BACKUP command.
By limiting the size of the backup set, you  force RMAN to create additional backup sets.
Also, you can specify BACKUP ... FILESPERSET to specify the maximum number of files in each backup set.

MAXSETSIZE =>

RMAN> run
{
backup datafile 1 format '/ora_home/bkp/file_1_%U' MAXSETSIZE 10M;
}2> 3> 4>

Starting backup at 24-SEP-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=270 instance=TNT1 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 09/24/2022 21:56:19
RMAN-06183: datafile or datafile copy +DATA/TNT/DATAFILE/system.282.1115902991 (file number 1) larger than MAXSETSIZE

RMAN>

As we checked in above example the size of datafile 1 is 910MB ,but in this example we are setting MAXSETSIZE to lower of atleast size of datafile 1 hence it's failing.

Let we reset it to 1000 MB and exute the same.

run
{
backup datafile 1 format '/ora_home/bkp/file_1_%U' MAXSETSIZE 1000M;
}

RMAN> 2> 3> 4>
Starting backup at 24-SEP-22
using channel ORA_DISK_1
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/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2318i5rj_1_1 tag=TAG20220924T215811 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116280695.770.1116280697 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

RMAN> 

Now let we try to take backup of database using MAXSETSIZE 1000M.

RMAN> run
{
backup database format '/ora_home/bkp/file_1_%U' MAXSETSIZE 1000M;
}2> 3> 4>

Starting backup at 24-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/TNT/DATAFILE/sysaux.283.1115903017
input datafile file number=00004 name=+DATA/TNT/DATAFILE/undotbs1.284.1115903031
input datafile file number=00005 name=+DATA/TNT/DATAFILE/undotbs2.290.1115904057
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2518i5tk_1_1 tag=TAG20220924T215916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
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/TNT/DATAFILE/system.282.1115902991
input datafile file number=00007 name=+DATA/TNT/DATAFILE/users.285.1115903033
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2618i5to_1_1 tag=TAG20220924T215916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116280763.769.1116280765 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

Now let we try to take backup of database using MAXSETSIZE default values.

run
{
backup database format '/ora_home/bkp/file_1_%U';
}
RMAN> 2> 3> 4> 

Starting backup at 24-SEP-22
using channel ORA_DISK_1
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/TNT/DATAFILE/system.282.1115902991
input datafile file number=00003 name=+DATA/TNT/DATAFILE/sysaux.283.1115903017
input datafile file number=00004 name=+DATA/TNT/DATAFILE/undotbs1.284.1115903031
input datafile file number=00005 name=+DATA/TNT/DATAFILE/undotbs2.290.1115904057
input datafile file number=00007 name=+DATA/TNT/DATAFILE/users.285.1115903033
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2818i5v2_1_1 tag=TAG20220924T220002 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116280810.768.1116280811 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

RMAN> 

Hence we can see that Multiple Backup set got generated when we set MAXSETSIZE 1000M.

We can configure MAXSETSIZE permanently as below.
RMAN> run
{
CONFIGURE MAXSETSIZE TO 1000M;
backup datafile 1 format '/ora_home/bkp/file_1_%U';
}

About Number and Size of RMAN Backup Pieces

By default a backup set contains one backup piece.
To restrict the size of each backup piece, specify the MAXPIECESIZE option of the CONFIGURE CHANNEL or ALLOCATE CHANNEL commands.

The MAXPIECESIZE option limits backup piece size to the specified number of bytes.
If the total size of the backup set is greater than the specified backup piece size, then RMAN creates multiple physical pieces to hold the backup set contents.

MAXPIECESIZE =>

Backup with DEFAULT setting of MAXPIECESIZE

RMAN> run
{
backup datafile 1 format '/ora_home/bkp/file_1_%U';
}
2> 3> 4>
Starting backup at 24-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=270 instance=TNT1 device type=DISK
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/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2d18i6h7_1_1 tag=TAG20220924T220943 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116281390.766.1116281393 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

Backup with New setting of MAXPIECESIZE

RMAN> run
{
ALLOCATE CHANNEL ch01 DEVICE TYPE DISK MAXPIECESIZE 200M;
backup datafile 1 format '/ora_home/bkp/file_1_%U';
}
2> 3> 4> 5>
allocated channel: ch01
channel ch01: SID=270 instance=TNT1 device type=DISK

Starting backup at 24-SEP-22
channel ch01: starting full datafile backup set
channel ch01: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/TNT/DATAFILE/system.282.1115902991
channel ch01: starting piece 1 at 24-SEP-22
channel ch01: finished piece 1 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2j18i6l8_1_1 tag=TAG20220924T221152 comment=NONE
channel ch01: starting piece 2 at 24-SEP-22
channel ch01: finished piece 2 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2j18i6l8_2_1 tag=TAG20220924T221152 comment=NONE
channel ch01: starting piece 3 at 24-SEP-22
channel ch01: finished piece 3 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2j18i6l8_3_1 tag=TAG20220924T221152 comment=NONE
channel ch01: starting piece 4 at 24-SEP-22
channel ch01: finished piece 4 at 24-SEP-22
piece handle=/ora_home/bkp/file_1_2j18i6l8_4_1 tag=TAG20220924T221152 comment=NONE
channel ch01: backup set complete, elapsed time: 00:00:07
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116281519.754.1116281521 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22
released channel: ch01

RMAN> 

So as we can see backup pieces are now divided into 200MB units in single backupset.
This type of setup reuired where restrictions apply while copying backup to Tape due to szie issue.

3=> Backup Duplexing & Backup of Backups

About Multiple Copies of RMAN Backups

RMAN enables you to make multiple ,identical copies of backups.

Use one of the following ways:

=> Duplex backups with the BACKUP ... COPIES command, in which case RMAN creates multiple copies of each backup set
=> Back up your files as backup sets or image copies, and then back up the backup sets or image copies with the RMAN BACKUP BACKUPSET or BACKUP COPY OF commands

About Duplexed Backup Sets

When backing up data files, archived redo log files, server parameter files, and control files into backup pieces,
RMAN can create a duplexed backup set, producing up to four identical copies of each backup piece in the backup set on different backup destinations with one BACKUP command.

Duplexing is not supported for backup operations that produce image copies.

You can use the COPIES parameter in the CONFIGURE, SET, or BACKUP commands to specify duplexing of backup sets when using the BACKUP command.
RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously.
When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices.
The FORMAT parameter of the BACKUP command specifies the destinations for duplexed backups.

BACKUP ... COPIES =>

RMAN> run
{
backup DEVICE TYPE DISK COPIES 2 datafile 1  format '/ora_home/bkp/file_1_%U','/ora_home/bkp1/file_1_%U';
}2> 3> 4> 

Starting backup at 24-SEP-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=270 instance=TNT1 device type=DISK
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/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: finished piece 1 at 24-SEP-22 with 2 copies and tag TAG20220924T222243
piece handle=/ora_home/bkp/file_1_2l18i79j_1_1 comment=NONE
piece handle=/ora_home/bkp1/file_1_2l18i79j_1_2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116282171.751.1116282173 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

RMAN> exit

Recovery Manager complete.

[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$ ls -lrt /ora_home/bkp/file_1_2l18i79j_1_1
-rw-r-----. 1 oracle asmadmin 829784064 Sep 24 22:22 /ora_home/bkp/file_1_2l18i79j_1_1
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$ ls -lrt /ora_home/bkp1/file_1_2l18i79j_1_2
-rw-r-----. 1 oracle asmadmin 829784064 Sep 24 22:22 /ora_home/bkp1/file_1_2l18i79j_1_2
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp/file_1_2l18i79j_1_1
793M /ora_home/bkp/file_1_2l18i79j_1_1
[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp1/file_1_2l18i79j_1_2
793M /ora_home/bkp1/file_1_2l18i79j_1_2
[oracle@racsetn1 bkp]$ 

As we can see 1 backupset created with Uniuqq ID having same size as copy of backuppiece in different location.

RMAN does not produce 2 backup sets, each with a different unique backup set key. Rather,
RMAN produces one backup set with a unique key, and generates 2 identical copies of each backup piece in the set.

BACKUP BACKUPSET  =>

Below command will backup all backupset and hence make copy of BACKUPSET .

run
{
BACKUP BACKUPSET all;
}

RMAN> run
{
BACKUP BACKUPSET all;
}2> 3> 4> 

Starting backup at 24-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=94, stamp=1116282694, piece=1
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
channel ORA_DISK_1: backup piece /ora_home/bkp/file_1_2u18i7q6_1_1
piece handle=+FRA/TNT/BACKUPSET/2022_09_24/nnnnf0_0.743.1116282709 comment=NONE
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:25
channel ORA_DISK_1: input backup set: count=95, stamp=1116282697, piece=1
channel ORA_DISK_1: starting piece 1 at 24-SEP-22
skipping backup piece handle +FRA/TNT/AUTOBACKUP/2022_09_24/s_1116282697.745.1116282699; already exists
channel ORA_DISK_1: finished piece 1 at 24-SEP-22
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:00
Finished backup at 24-SEP-22

Starting Control File and SPFILE Autobackup at 24-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_24/s_1116282734.751.1116282735 comment=NONE
Finished Control File and SPFILE Autobackup at 24-SEP-22

RMAN> 


RMAN> list backup;

List of Backup Sets
===================

BS Key  Type LV Size
------- ---- -- ----------
69      Full    791.34M
  List of Datafiles in backup set 69
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 2241896    24-SEP-22              NO    +DATA/TNT/DATAFILE/system.282.1115902991

  Backup Set Copy #1 of backup set 69
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:01     24-SEP-22       NO         TAG20220924T223133

    List of Backup Pieces for backup set 69 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    108     1   AVAILABLE   /ora_home/bkp/file_1_2u18i7q6_1_1

  Backup Set Copy #2 of backup set 69
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:01     24-SEP-22       NO         TAG20220924T223133

    List of Backup Pieces for backup set 69 Copy #2
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    110     1   AVAILABLE   +FRA/TNT/BACKUPSET/2022_09_24/nnnnf0_0.743.1116282709

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
70      Full    10.27M     DISK        00:00:02     24-SEP-22     
        BP Key: 109   Status: AVAILABLE  Compressed: NO  Tag: TAG20220924T223137
        Piece Name: +FRA/TNT/AUTOBACKUP/2022_09_24/s_1116282697.745.1116282699
  SPFILE Included: Modification time: 24-SEP-22
  SPFILE db_unique_name: TNT
  Control File Included: Ckp SCN: 2241908      Ckp time: 24-SEP-22

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
71      Full    10.27M     DISK        00:00:02     24-SEP-22     
        BP Key: 111   Status: AVAILABLE  Compressed: NO  Tag: TAG20220924T223214
        Piece Name: +FRA/TNT/AUTOBACKUP/2022_09_24/s_1116282734.751.1116282735
  SPFILE Included: Modification time: 24-SEP-22
  SPFILE db_unique_name: TNT
  Control File Included: Ckp SCN: 2241973      Ckp time: 24-SEP-22

RMAN> 

4=> SECTION SIZE (Breaking Large File into Parts).

Specify the SECTION SIZE parameter on the BACKUP command, then RMAN can create a multisection backup.
In this case, a single backup set can contain multiple backup pieces, each containing a file section. 
The purpose of multisection backups is to enable multiple channels to back up a large file in parallel.

This is a backup of a single large file, produced by multiple channels in parallel, each of which produces one backup piece.
Each backup piece contains one file section of the file being backed up.

It is useful when you want to enable RMAN channels to back up a single large file in parallel. 
RMAN divides the work among multiple channels, with each channel backing up one file section in a backup piece.
Backing up a file in separate sections can improve the performance of backups of large datafiles.

SECTION SIZE with NO PARALLEL CHANNEL.
RMAN> run
{
backup datafile 1 format '/ora_home/bkp/file_1_%U' section size 400M;
}
2> 3> 4>
Starting backup at 25-SEP-22
using channel ORA_DISK_1
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/TNT/DATAFILE/system.282.1115902991
backing up blocks 1 through 51200
channel ORA_DISK_1: starting piece 1 at 25-SEP-22
channel ORA_DISK_1: finished piece 1 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3218id7c_1_1 tag=TAG20220925T000356 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
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/TNT/DATAFILE/system.282.1115902991
backing up blocks 51201 through 102400
channel ORA_DISK_1: starting piece 2 at 25-SEP-22
channel ORA_DISK_1: finished piece 2 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3218id7c_2_1 tag=TAG20220925T000356 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
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/TNT/DATAFILE/system.282.1115902991
backing up blocks 102401 through 116480
channel ORA_DISK_1: starting piece 3 at 25-SEP-22
channel ORA_DISK_1: finished piece 3 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3218id7c_3_1 tag=TAG20220925T000356 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-SEP-22

Starting Control File and SPFILE Autobackup at 25-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_25/s_1116288245.754.1116288247 comment=NONE
Finished Control File and SPFILE Autobackup at 25-SEP-22

RMAN> 


[oracle@racsetn1 bkp]$
[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp/file_1_3218id7c_1_1
315M /ora_home/bkp/file_1_3218id7c_1_1
[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp/file_1_3218id7c_2_1
392M /ora_home/bkp/file_1_3218id7c_2_1
[oracle@racsetn1 bkp]$ du -sh /ora_home/bkp/file_1_3218id7c_3_1
86M /ora_home/bkp/file_1_3218id7c_3_1
[oracle@racsetn1 bkp]$ 

As we can see with ONLY 1 Channel 910mb File is divided in 3 parts as 910/400 with defaule compression.

SECTION SIZE with PARALLEL CHANNEL.

Let we use PARALLEL CHANNEL i.e use mutiple channel to SPEEDUP Backup of datafiles.

RMAN> run
{
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
backup datafile 1 format '/ora_home/bkp/file_1_%U' section size 400M;
}
2> 3> 4> 5>
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored

Starting backup at 25-SEP-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=270 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=406 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=17 instance=TNT1 device type=DISK
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/TNT/DATAFILE/system.282.1115902991
backing up blocks 1 through 51200
channel ORA_DISK_1: starting piece 1 at 25-SEP-22
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/TNT/DATAFILE/system.282.1115902991
backing up blocks 51201 through 102400
channel ORA_DISK_2: starting piece 2 at 25-SEP-22
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/TNT/DATAFILE/system.282.1115902991
backing up blocks 102401 through 116480
channel ORA_DISK_3: starting piece 3 at 25-SEP-22
channel ORA_DISK_1: finished piece 1 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3618idjp_1_1 tag=TAG20220925T001033 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_2: finished piece 2 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3618idjp_2_1 tag=TAG20220925T001033 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_3: finished piece 3 at 25-SEP-22
piece handle=/ora_home/bkp/file_1_3618idjp_3_1 tag=TAG20220925T001033 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:03
Finished backup at 25-SEP-22
Starting Control File and SPFILE Autobackup at 25-SEP-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_09_25/s_1116288638.757.1116288639 comment=NONE
Finished Control File and SPFILE Autobackup at 25-SEP-22

RMAN>