• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Oracle RMAN 11g New Feature – MultiSection Backups

by admin

What are MultiSection Backups?

By default, RMAN uses the parameters like filesize and number of available channels to decide whether to produce a single or multidatafile backupset with 1 or more backuppieces. In a multisection backup, RMAN creates a backup set in which each backup piece contains the blocks from one datafile section. A file section is a contiguous range of blocks in a datafile.

The purpose of multisection backups is to enable RMAN to back up a single file in parallel. RMAN divides the work among multiple channels, with each channel backing up one file section. Backing up a file in separate sections can improve both the performance and restartability of backups of bigfiles and/or datafiles which are of a big size.

Example

This example will show the principle of the Multi Section Backups for only 1 datafile. Doing it for only 1 datafile is making the output easier to read and explain.

RMAN> report schema;

Report of database schema for database with db_unique_name V110

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 300 SYSTEM YES /oradata/v110/system01.dbf
2 120 SYSAUX NO /oradata/v110/sysaux01.dbf
3 200 UNDOTBS1 YES /oradata/v110/undotbs01.dbf
4 20 RECOVER_TEST NO /oradata/v110/recover_test.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /oradata/v110/temp01.dbf

A SECTION SIZE of 100m will split each datafile in 100Mb backupsets and will be backed up by 2 channels. So 1 backupset with 3 pieces for datafile 1.

RMAN> backup section size 100m datafile 1;

Starting backup at 11-JAN 06:13:29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=138 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=141 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=/oradata/v110/system01.dbf
backing up blocks 1 through 16384
channel ORA_DISK_1: starting piece 1 at 11-JAN 06:13:31
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=/oradata/v110/system01.dbf
backing up blocks 16385 through 32768
channel ORA_DISK_2: starting piece 2 at 11-JAN 06:13:31
channel ORA_DISK_2: finished piece 2 at 11-JAN 06:13:37
piece handle=/backups/v110/V110_36i77c4b_2_1 tag=TAG20070111T061330 comment=NONEchannel ORA_DISK_2: backup set complete, elapsed time: 00:00:06
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=/oradata/v110/system01.dbf
backing up blocks 32769 through 38400
channel ORA_DISK_2: starting piece 3 at 11-JAN 06:13:38
channel ORA_DISK_1: finished piece 1 at 11-JAN 06:13:39
piece handle=/backups/v110/V110_36i77c4b_1_1 tag=TAG20070111T061330 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
channel ORA_DISK_2: finished piece 3 at 11-JAN 06:13:39
piece handle=/backups/v110/V110_36i77c4b_3_1 tag=TAG20070111T061330 comment=NONEchannel ORA_DISK_2: backup set complete, elapsed time: 00:00:08
Finished backup at 11-JAN 06:13:39

Starting Control File and SPFILE Autobackup at 11-JAN 06:13:39
piece handle=/backups/v110/V110_c-1689207191-20070111-07 comment=NONE
Finished Control File and SPFILE Autobackup at 11-JAN 06:13:40

The SECTION information is available in V$BACKUP_DATAFILE and RC_BACKUP_DATAFILE.

SQL> select block_size, blocks, blocks_read, section_size
from v$backup_datafile
where file#=1;

BLOCK_SIZE BLOCKS     BLOCKS_READ SECTION_SIZE
---------- ---------- ----------- ------------
8192       11040      16384         16384

The RMAN tracefile shows :

DBGMISC: krmkbck: files=1 blocks=38400 sets=1 setsize=38400 hard_lim=0 hard_kb=0
...
DBGMISC: krmkbck: backup set list: [06:19:20.759]
DBGMISC: 1 SL blocks=0 blksize=0 files=0 bscomp=0
DBGMISC: 2 SL blocks=38400 blksize=0 files=1 bscomp=0
DBGMISC: [completion time set][multi-section]
DBGMISC: 1 DF fno=1 crescn=10 blksize=8192 blocks=38400 rfno=1
DBGMISC: fn=/oradata/v110/system01.dbf
DBGMISC: ts=SYSTEM, flags=KRMKDF_INBACKUP
DBGMISC: fedata: sta=0x0e crescn=10
DBGMISC: fhdata: ckpscn=251298 rlgscn=1
DBGMISC: device=2080 blocks=38400
DBGMISC: node=NULL_NODE
.....
DBGMISC: krmfmxi, filesize=38400, secsize=16384, seccnt=3, stamp=611561961, count=111

The output of the section backup is a normal backuppiece. If send to tape than compression and deduplication will still work, but on this backuppiece only, not on the whole datafile.

NOTE: Oracle 12c supports multisection incremental backups.

Filed Under: oracle, Oracle 11g, oracle 12c

Some more articles you might also be interested in …

  1. How to Trace Dynamic Registration from PMON or LREG (Oracle 12c)
  2. How to backup and delete archivelogs older than # number of days
  3. Warning: ORA-16829: fast-start failover configuration is lagging
  4. Oracle RMAN interview questions
  5. Beginners Guide to Working with spfile in Oracle ASM
  6. How to Use DBMS_METADATA To Get The DDL For Objects
  7. How to change the ASM rebalance power of an ongoing operation
  8. Shell Script to run DataPump Import Export
  9. ORA-38760 while starting One of the Oracle RAC Instances
  10. Managing Rollback/Undo Segments in AUM (Automatic Undo Management)

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright