HOME

Understanding RMAN's MAXPIECESIZE, SECTION SIZE and MAXSETSIZE options

Contact Me

MAXPIECESIZE is handled via CHANNEL, while SECTION SIZE and MAXSETSIZE are handled via BACKUP or CONFIGURE command.

MAXPIECESIZE


When writing files to backup media in RMAN, maxpiecesize can be used to ensure that the RMAN piece does not exceed to limit on OS file size. This RMAN block will form backup pieces without any size restriction, as shown below :

	RMAN> run {
	CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
	BACKUP DATABASE PLUS ARCHIVELOG  DELETE ALL INPUT  ;
	}
	
	

bs# size file_type file_name

43 364.32Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0D61OXY_.BKP 43 651.27Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF 43 565.03Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSAUX01.DBF 43 3.06Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\UNDOTBS01.DBF 43 1.31Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\USERS01.DBF 44 234.74Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0D63G4N_.BKP 44 220.36Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSTEM01.DBF 44 484.38Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSAUX01.DBF 44 41.52Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\USERS01.DBF 44 77.06Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\EXAMPLE01.DBF

This RMAN block will form backup pieces WITH size restriction, all pieces being below specified 60M in size, as shown :

	RMAN> run {
	CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
	allocate channel c1 DEVICE TYPE DISK MAXPIECESIZE = 60M;
	backup DATABASE PLUS ARCHIVELOG  DELETE ALL INPUT  ;
	}
	
	

bs# size file_type file_name

50 58.09Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKLV4R_.BKP 50 58.02Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKM9ST_.BKP 50 58.05Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKMRTF_.BKP 50 58.15Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKN7TO_.BKP 50 58.2Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKNGW5_.BKP 50 58.13Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKNOYM_.BKP 50 20.72Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKO4YS_.BKP 50 651.27Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF 50 571.41Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSAUX01.DBF 50 2.77Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\UNDOTBS01.DBF 50 1.31Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\USERS01.DBF 51 58.29Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKO908_.BKP 51 58.15Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKOQJK_.BKP 51 58.02Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKP6HW_.BKP 51 58.07Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKPOJY_.BKP 51 5.35Mb PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0GKQ4K2_.BKP 51 220.36Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSTEM01.DBF 51 484.4Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSAUX01.DBF 51 41.52Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SAMPLE_SCHEMA_USERS01.DBF 51 77.06Mb DATAFILE C:\ORACLE\ORADATA\ORCL12C\PDBORCL\EXAMPLE01.DBF

So if you want to limit the backup piece size, use MAXPIECESIZE via CHANNEL option.

SECTION SIZE TOP


Tom says "Section size RMAN backup argument produces multi-section backups. This is for multi-CPU servers where you can create multiple channels to backup an Oracle tablespace datafiles in parallel.
It will produce 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 specified size) of the file being backed up".
In my words:
A file section is contiguous range of file blocks. So say, if a datafile's physical disk size is 800M, and we give give a SECTION SIZE of 250M, then there will be 4 sections to backup (250+250+250+100). And these 4 sections can be backed up in parallel manner.
You can get file size via :
select file_name,ROUND(bytes/1024/1024,2) ||'Mb' from DBA_DATA_FILES;

Here file size is 800M:

	
	CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
	BACKUP SECTION SIZE 250m  datafile 'C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF';
	
	
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H016X9_.BKP
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET...B0H01G6X_.BKP
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H01XKM_.BKP
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H02T4W_.BKP
	DATAFILE    C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF
	
Here file size is 48M:
	RMAN> BACKUP SECTION SIZE 50m  datafile 'C:\oracle\oradata\orcl12c\pdborcl\SAMPLE_SCHEMA_USERS01.dbf';
	
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0H0V2H5_.BKP
	DATAFILE    C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SAMPLE_SCHEMA_USERS01.DBF
	
Here its 352M:
	RMAN> BACKUP SECTION SIZE 250m  datafile 'C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSTEM01.DBF;
	
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0H0QWNV_.BKP
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0H0RCWT_.BKP
	DATAFILE    C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSTEM01.DBF
	
Here its 630M:
	RMAN> BACKUP SECTION SIZE 600m  datafile 'C:\oracle\oradata\orcl12c\pdborcl\SYSAUX01.dbf';
	
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0H2N5S1_.BKP
	PIECE    C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\...B0H2NZ0P_.BKP
	DATAFILE    C:\ORACLE\ORADATA\ORCL12C\PDBORCL\SYSAUX01.DBF
	

MAXSETSIZE TOP


Specifies the maximum size of each backup set created on a channel. If you specify a lower value, than maximum sized file, backup will fail, Here system01.dbf is 770M.

	
	RMAN> CONFIGURE MAXSETSIZE TO 750m;
	RMAN> backup DATABASE PLUS ARCHIVELOG  DELETE ALL INPUT  ;
	

	Starting backup at 03-SEP-14
	current log archived
	using channel ORA_DISK_1
	channel ORA_DISK_1: starting compressed archived log backup set
	channel ORA_DISK_1: specifying archived log(s) in backup set
	input archived log thread=1 sequence=42 RECID=32 STAMP=857322499
	channel ORA_DISK_1: starting piece 1 at 03-SEP-14
	channel ORA_DISK_1: finished piece 1 at 03-SEP-14
	piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\2014_09_03\O1_MF_ANNNN_TAG20140903T170820_B0H4BN67_.BKP tag=TAG20140903T170820 comment=NONE
	channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
	channel ORA_DISK_1: deleting archived log(s)
	archived log file name=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\ARCHIVELOG\2014_09_03\O1_MF_1_42_B0H4BMR6_.ARC RECID=32 STAMP=857322499
	Finished backup at 03-SEP-14

	Starting backup at 03-SEP-14
	using channel ORA_DISK_1
	RMAN-00571: ===========================================================
	RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
	RMAN-00571: ===========================================================
	RMAN-03002: failure of backup plus archivelog command at 09/03/2014 17:08:22
	RMAN-06183: datafile or datafile copy C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF (file number 1) larger than MAXSETSIZE
	

Lets increase MAXSETSIZE to a value above 770M:

	
	RMAN> CONFIGURE MAXSETSIZE TO 800M;
	RMAN> backup DATABASE PLUS ARCHIVELOG  DELETE ALL INPUT ;
	
	----------------------------------Success-----------------------------------------
	
	

BS# File_type File_name

169 PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H4C6GL_.BKP 169 DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSTEM01.DBF 170 PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H4CZJB_.BKP 170 DATAFILE C:\ORACLE\ORADATA\ORCL12C\SYSAUX01.DBF 171 PIECE C:\ORACLE\FLASH_RECOVERY_AREA\ORCL12C\BACKUPSET\...B0H4DRVH_.BKP 171 DATAFILE C:\ORACLE\ORADATA\ORCL12C\UNDOTBS01.DBF 171 DATAFILE C:\ORACLE\ORADATA\ORCL12C\USERS01.DBF
Thanks...

TOP