After learning RMAN introduction and taking first backup of database, we will go through file section for RMAN backups of large datafiles and databases.
- With introduction of BigFile tablespaces in oracle, large sized datafiles are command these days. For such large datafiles, it takes enormous amount of time to get backed up.
- By using multiple channels, we can make it faster but issue remains same for single large sized datafiles, as channels support inter-file parallelism not intra-file parallelism
- To resolve this we need to logically divide large data file into small file chunks using the option “SECTION SIZE” in backup command
- When large data file is broken into many smaller chunks, each chunk will be treated as separate file. Every single chunk will be backed up by individual channels i.e. intra parallelism.
- SECTION SIZE can be mentioned in KB, MB, GB and backup will be completed in backup set format
- SECTION SIZE clause can be used in either full database backup or partial database backup such as tablespace or datafile
- In below example, we will take backup of one of tablespace SYSTEM using SECTION SIZE
{
allocate
channel ch1 type disk;
BACKUP
SECTION SIZE 800M TABLESPACE SYSTEM;
release
channel ch1;
}2>
3> 4> 5> 6>
allocated
channel: ch1
channel
ch1: SID=2330 device type=DISK
Starting
backup at 07-JAN-19
channel
ch1: starting full datafile backup set
channel
ch1: specifying datafile(s) in backup set
input
datafile file number=00001 name=+DATA/TECH_DB/DATAFILE/system.285.996743219
backing
up blocks 1 through 102400
channel
ch1: starting piece 1 at 07-JAN-19
channel
ch1: finished piece 1 at 07-JAN-19
piece
handle=+FLASH/TECH_DB/BACKUPSET/2019_01_07/nnndf0_tag20190107t054719_0.328.996904041
tag=TAG20190107T054719 comment=NONE
channel
ch1: backup set complete, elapsed time: 00:00:07
channel
ch1: starting full datafile backup set
channel
ch1: specifying datafile(s) in backup set
input
datafile file number=00001 name=+DATA/TECH_DB/DATAFILE/system.285.996743219
backing
up blocks 102401 through 204800
channel
ch1: starting piece 2 at 07-JAN-19
channel
ch1: finished piece 2 at 07-JAN-19
piece
handle=+FLASH/TECH_DB/BACKUPSET/2019_01_07/nnndf0_tag20190107t054719_0.327.996904049
tag=TAG20190107T054719 comment=NONE
channel
ch1: backup set complete, elapsed time: 00:00:03
channel
ch1: starting full datafile backup set
channel
ch1: specifying datafile(s) in backup set
input
datafile file number=00001 name=+DATA/TECH_DB/DATAFILE/system.285.996743219
backing
up blocks 204801 through 262144
channel
ch1: starting piece 3 at 07-JAN-19
channel
ch1: finished piece 3 at 07-JAN-19
piece
handle=+FLASH/TECH_DB/BACKUPSET/2019_01_07/nnndf0_tag20190107t054719_0.326.996904051
tag=TAG20190107T054719 comment=NONE
channel
ch1: backup set complete, elapsed time: 00:00:03
channel
ch1: starting full datafile backup set
channel
ch1: specifying datafile(s) in backup set
including
current control file in backup set
including
current SPFILE in backup set
channel
ch1: starting piece 1 at 07-JAN-19
channel
ch1: finished piece 1 at 07-JAN-19
piece
handle=+FLASH/TECH_DB/BACKUPSET/2019_01_07/ncsnf0_tag20190107t054719_0.325.996904055
tag=TAG20190107T054719 comment=NONE
channel
ch1: backup set complete, elapsed time: 00:00:01
Finished
backup at 07-JAN-19
released
channel: ch1
RMAN>
- For Oracle 12c onward, SECTION SIZE clause can be used for image copy format backup as well, command will be like below
RMAN > backup as copy SECTION
SIZE 500M database;
- Using SECTION SIZE method, it helps a lot in case database is huge to reduce elapsed time.
Feel free to comment here and share if you like it.
[Also read : RMAN disk backup ]
0 comments:
Post a Comment