I have seen many DBAs having issues with Parallelism in RMAN, some DBAs could say that the RMAN parallel settings have to be set, others says that the channels that we assign explicitly is what have more priority. In this article we will explore that relation between RMAN Parallel Setting and also Pre-Configure Channels and Allocated Channels through several examples where we will be able to see the behavior of every scenario.
Firstable let's touch some important concepts.
Channel: An RMAN channel is basically one stream of data that interacts with a device. We can say that each Channel corresponds to one database server session. The channel reads data into PGA memory, processes it, and writes it. In the following image we cay see the role of Channel.
RMAN Parallel Setting: This is a setting used by RMAN in order to perform backups and recovery taks with Parallelism. In fact this setting is important because RMAN uses this value in order to execute those tasks where we don't specify the number of channels we want to use (no allocated channels). RMAN will try to use in its tasks as much parallelism as this values specifies. For example if we have Parallelism=2, RMAN will try to always auto-allocated two channels in order to perform the task in Parallel (Parallelism degree= 2). This means that when we don't Allocate Channels explicitly and we don't pre-configured Channel, RMAN allocates all necessary channels for the device types required to execute the command. RMAN determines the names for automatic channels and assign those names automatically. Usually the names are like "ORA_DISK_1", "ORA_DISK_2", "ORA_DISK_3".
Pre-configured Channels: We can pre-configure channels by using the "CONFIGURE CHANNEL" command, we can pre-configure channels either for disk or tape. The advantage of this is that we can specify several options that we want to use in our RMAN tasks for example MAXPIECESIZE or FORMAT, so that instead of to specify all those options every time, we can pre-configure our own channels with our favorite option/settings and RMAN will use these channels whenever possible. This is also known as "automatic channel allocation".
Allocated Channels: We can also Allocate channels explicitly, when we do this each allocated channel (manually) uses a separate connection to the database and every channel works in parallel (or serially) and every channel creates its own Backup Set, we can also give each channel a user-defined name such as "MyChannel1" or "MyOtherChannel". When we are using multiple channels we have to be aware that each channel may back up more than one file, but unless a multisection backup is performed, no file is backed up by more than one channel.
Now that we have the concepts, let's go to the examples. In order to leave these concepts clear we will perform all those examples:
- Without RMAN Parallelism Setting (Parallel =1)
- No Channels pre-configured No Channels explicitely
- Normal Database Backup
- Database Backup with Multi Section
- No Channels pre-configured No Channels explicitely
- Normal Database Backup
- Database Backup with Multi Section
- Channels pre-configured
- Normal Database Backup
- Database Backup with Multi Section
- No Channels pre-configured No Channels explicitely
- With RMAN Parallel Setting (Parallel =3)
- No Channels pre-configured No Channels explicitely
- Normal Database Backup
- Database Backup with Multi Section
- No Channels pre-configured No Channels explicitely
- Normal Database Backup:
- Database Backup with Multi Section
- Channels pre-configured
- Normal Database Backup:
- Database Backup with Multi Section
- No Channels pre-configured No Channels explicitely
As you see, we have two main categories, When we Using RMAN Parallelism settings and when we are not (Parallel=1) and in each category we are checking out what happen when we use Channels (Manually Allocated or Pre-Configured) and when we are not (Automatically Allocated Channels), so that we will be able to see the behavior in every scenario and at the end we will grab the conclusions.
Without RMAN Parallelism Setting (Parallel =1)
Let's confirm that we are not using RMAN Parallelism Setting and also that we don't have pre-configured Channels.
RMAN> show device type;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters
RMAN>
No Channels pre-configured No Channels explicitly
Normal Database Backup
RMAN> run
{
Backup Database format '/home/oracle/Backups/%U';
}2> 3> 4>
Starting backup at 03-SEP-16
allocated channel: ORA_DISK_1 /*Only one Channel is asigned to this task*/
channel ORA_DISK_1: SID=43 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/orcl/datafile/system.262.912909191
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/6uresb67_1_1 tag=TAG20160903T100455 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/6vresb6f_1_1 tag=TAG20160903T100455 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
In this case we saw that RMAN doesn't use Parallelism, it use one "Automatically Allocated Channel" because we can see that the channel that did all the work was called "ORA_DISK_1" and it was automatically assigned. This is because the RMAN Parallelism Setting is set to "1" and we are not using Manually Allocated Channels in our "run" block.
Database Backup with Multi Section
RMAN> run{
Backup Section Size 10M Database format '/home/oracle/Backups/%U';
}2> 3>
Starting backup at 03-SEP-16
using channel ORA_DISK_1 /*Only one Channel is asigned to this task*/
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/orcl/datafile/system.262.912909191
backing up blocks 1 through 1280
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/70resb77_1_1 tag=TAG20160903T100527 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
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/orcl/datafile/system.262.912909191
backing up blocks 1281 through 2560
channel ORA_DISK_1: starting piece 2 at 03-SEP-16
channel ORA_DISK_1: finished piece 2 at 03-SEP-16
piece handle=/home/oracle/Backups/70resb77_2_1 tag=TAG20160903T100527 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
....
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/bnresbc9_1_1 tag=TAG20160903T100527 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/boresbcb_1_1 tag=TAG20160903T100527 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
In this case we saw the same result, that RMAN doesn't use Parallelism, the Backup was performed serially, even if the task can be performed with Parallelism which is the case of "Multi Section", it used one"Automatically Allocated Channel". This is because the RMAN Parallelism Setting is set to "1" and we are not using Manually Allocated Channels in our "run" block. We saw that with this combination, if the task can be performed in Parallel (Multi Section )doesn't care.
Using Channels explicitly (Manually allocated)
Normal Database Backup
RMAN> run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
Backup Database format '/home/oracle/Backups/%U';
release channel c1;
release channel c2;
release channel c3;
}2> 3> 4> 5> 6> 7> 8> 9> 10>
allocated channel: c1 /*One channel for this task*/
channel c1: SID=43 device type=DISK
allocated channel: c2 /*Second Channel for this task*/
channel c2: SID=42 device type=DISK
allocated channel: c3 /*Third Channel for this task*/
channel c3: SID=45 device type=DISK
Starting backup at 03-SEP-16
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.262.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel c1: starting piece 1 at 03-SEP-16
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
channel c2: starting piece 1 at 03-SEP-16
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
channel c3: starting piece 1 at 03-SEP-16
channel c1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/bsresbia_1_1 tag=TAG20160903T101121 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
channel c2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/btresbia_1_1 tag=TAG20160903T101121 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:07
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c2: starting piece 1 at 03-SEP-16
channel c3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/buresbia_1_1 tag=TAG20160903T101121 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:07
including current control file in backup set
channel c1: starting piece 1 at 03-SEP-16
channel c1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/bvresbih_1_1 tag=TAG20160903T101121 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/c0resbih_1_1 tag=TAG20160903T101121 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
released channel: c1
released channel: c2
released channel: c3
This is interesting, RMAN Parallelism Setting is set to value "1", however it seems When we manually allocate Channels, those Channels overwrites the RMAN Parallelism Setting, in this case 3 Channels in Parallel were working regardless the RMAN Parallel Settings. So the Manually Allocated Channles have priority.
Database Backup with Multi Section
RMAN> run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
Backup Section Size 10M Database format '/home/oracle/Backups/%U';
release channel c1;
release channel c2;
release channel c3;
}2> 3> 4> 5> 6> 7> 8> 9>
allocated channel: c1
channel c1: SID=43 device type=DISK
allocated channel: c2
channel c2: SID=42 device type=DISK
allocated channel: c3
channel c3: SID=45 device type=DISK
Starting backup at 03-SEP-16
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.262.912909191
backing up blocks 1 through 1280
channel c1: starting piece 1 at 03-SEP-16
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
backing up blocks 1 through 1280
channel c2: starting piece 1 at 03-SEP-16
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
backing up blocks 1 through 1280
...
channel c3: starting piece 1 at 03-SEP-16
channel c1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/gpresbjo_1_1 tag=TAG20160903T101151 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:00
including current control file in backup set
channel c2: starting piece 1 at 03-SEP-16
channel c2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/goresbjo_1_1 tag=TAG20160903T101151 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/gqresbjo_1_1 tag=TAG20160903T101151 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
released channel: c1
released channel: c2
released channel: c3
RMAN>
The result now looks obvious, "Multi Section" is a common task performed with Parallelism, since we know that Manually Allocated Channles have more Priority over the RMAN Parallel Setting, we see in this task using 3 Channels in Parallel.
Using Channels pre-configured
Now let's Pre-Configure Channels, two Channels, so that we can see if some tasks are performed with Parallel 2 (This will confirm that Pre-Configured Channels have more Priority) or Parallel 1 (This will confirm that RMAN Parallel Setting has more Priority)
RMAN> configure channel 1 device type disk format '/home/oracle/Backups/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
RMAN> configure channel 2 device type disk format '/home/oracle/Backups/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
new RMAN configuration parameters are successfully stored
Confirming the Channels were stored:
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
Normal Database Backup
RMAN> run
{
Backup Database format '/home/oracle/Backups/%U';
}2> 3> 4>
Starting backup at 03-SEP-16
using target database control file instead of recovery catalog
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=48 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/orcl/datafile/system.262.912909191
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/h7resc0n_1_1 tag=TAG20160903T101903 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/h8resc0u_1_1 tag=TAG20160903T101903 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
This is really interesting, look at the message where says "Channel 2 is ignored", RMAN is telling us that only one pre-configured Channel was used, since we pre-configured two channels, the second was was ignored, Why? Why RMAN is using only one channel even when we have two Channels pre-configured, we would think that RMAN could use those two channels and as a result we would have Parallelism=2, however since RMAN Parallelism Setting is set to value "1", Oracle is using exactly the number of channels that matches with the RMAN Parallelism Setting. In this Case #ChannlesUsed=1 Because RMAN Parallelism Setting is "1". The conclusion is that when we are using only Pre-Configured Channels (No Manually Allocated Channels) RMAN Parallelism Setting says how many of those pre-configured Channels will be used.
Database Backup with Multi Section
RMAN> run{
Backup Section Size 10M Database format '/home/oracle/Backups/%U';
}2> 3>
Starting backup at 03-SEP-16
using target database control file instead of recovery catalog
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 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/orcl/datafile/system.262.912909191
backing up blocks 1 through 1280
...
...
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m1resc7d_1_1 tag=TAG20160903T101946 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
The result is the same, #ChannlesUsed=1 Because RMAN Parallelism Setting is "1". RMAN Parallelism Setting said how many of pre-configured Channels will be used (In this case 1 pre-configured Channel).
With RMAN Parallel Setting (Parallel =3)
Now let's reset the pre-configured Channels and also let's use RMAN Parallelism Setting to 3.
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
RMAN> show device type;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters
RMAN>
No Channels pre-configured No Channels explicitely
Normal Database Backup
RMAN> run
{
Backup Database format '/home/oracle/Backups/%U';
}2> 3> 4>
Starting backup at 03-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=48 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=22 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=45 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/orcl/datafile/system.262.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
channel ORA_DISK_2: starting piece 1 at 03-SEP-16
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
channel ORA_DISK_3: starting piece 1 at 03-SEP-16
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m7rescem_1_1 tag=TAG20160903T102629 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m5rescem_1_1 tag=TAG20160903T102629 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m6rescem_1_1 tag=TAG20160903T102629 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:08
including current control file in backup set
channel ORA_DISK_3: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m9resceu_1_1 tag=TAG20160903T102629 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/m8rescen_1_1 tag=TAG20160903T102629 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
We saw something new, Now We have seen that when we have Parallelism >1 and we are not using Manually Allocated Channels in the "run" block, the number of Channels used will be the number of the value of RMAN Parallelism Setting and we have seen also that the Channels that we assigned have Generic name which means that those channels were Automatically Allocated.
Database Backup with Multi Section
RMAN> run{
Backup Section Size 50M Database format '/home/oracle/Backups/%U';
}2> 3>
Starting backup at 03-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=48 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=43 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=42 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
...
...
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:00
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/nbresci1_1_1 tag=TAG20160903T102806 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/n9resci1_1_1 tag=TAG20160903T102806 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
In this scenario is the same, When no Manually Allocated Channels are used in the "run" block, The number of Automatically Allocated Channels is the same than RMAN Parallelism Setting.
Using Channels explicitly (Manually Allocated)
Normal Database Backup:
RMAN> run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
Backup Database format '/home/oracle/Backups/%U';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=40 device type=DISK
allocated channel: c2
channel c2: SID=43 device type=DISK
allocated channel: c3
channel c3: SID=42 device type=DISK
allocated channel: c4
channel c4: SID=22 device type=DISK
Starting backup at 03-SEP-16
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.262.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel c1: starting piece 1 at 03-SEP-16
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
channel c2: starting piece 1 at 03-SEP-16
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
channel c3: starting piece 1 at 03-SEP-16
channel c4: starting full datafile backup set
channel c4: specifying datafile(s) in backup set
channel c3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/njrescl7_1_1 tag=TAG20160903T102959 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c3: starting piece 1 at 03-SEP-16
including current control file in backup set
channel c4: starting piece 1 at 03-SEP-16
channel c2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/nirescl7_1_1 tag=TAG20160903T102959 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:05
channel c1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/nhrescl7_1_1 tag=TAG20160903T102959 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:09
channel c3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/nlrescl9_1_1 tag=TAG20160903T102959 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:07
channel c4: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/nkrescl7_1_1 tag=TAG20160903T102959 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:07
Finished backup at 03-SEP-16
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN>
As expected, Manually Allocated Channels in the "run" block overwrites RMAN Parallel Setting, that's why the four Channels were used here instead of three.
Database Backup with Multi Section
RMAN> run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
Backup Section Size 50M Database format '/home/oracle/Backups/%U';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
2> 3> 4> 5> 6> 7> 8> 9> 10> 11>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=43 device type=DISK
allocated channel: c2
channel c2: SID=40 device type=DISK
allocated channel: c3
channel c3: SID=41 device type=DISK
allocated channel: c4
channel c4: SID=48 device type=DISK
Starting backup at 03-SEP-16
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.262.912909191
backing up blocks 1 through 6400
channel c1: starting piece 1 at 03-SEP-16
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
....
....
channel c1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/onrescnf_1_1 tag=TAG20160903T103102 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/olrescnf_1_1 tag=TAG20160903T103102 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN>
The same result than the last example, Manually Allocated Channels in the "run" block overwrites RMAN Parallel Setting, that's why the four Channels were used here instead of three.
Using Channels pre-configured
For this section we will need to Pre-allocate two Channels:
RMAN> configure channel 1 device type disk format '/home/oracle/Backups/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
new RMAN configuration parameters are successfully stored
RMAN> configure channel 2 device type disk format '/home/oracle/Backups/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
new RMAN configuration parameters are successfully stored
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE CHANNEL 1DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/home/oracle/Backups/%U';
Normal Database Backup:
run
{
Backup Database format '/home/oracle/Backups/%U';
}2> 3> 4>
Starting backup at 03-SEP-16
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
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/orcl/datafile/system.262.912909191
input datafile file number=00004 name=+DATA/orcl/datafile/users.271.912909191
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.912909191
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.912909191
channel ORA_DISK_2: starting piece 1 at 03-SEP-16
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/tbs1.279.918100673
input datafile file number=00010 name=+DATA/orcl/datafile/tbs2.256.918102673
channel ORA_DISK_3: starting piece 1 at 03-SEP-16
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/ovrescs2_1_1 tag=TAG20160903T103338 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_3: starting piece 1 at 03-SEP-16
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/otrescs2_1_1 tag=TAG20160903T103338 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/ourescs2_1_1 tag=TAG20160903T103338 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:06
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/p0rescs4_1_1 tag=TAG20160903T103338 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/p1rescs8_1_1 tag=TAG20160903T103338 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
In this scenario you would think that it doesn't matter if we have Pre-Allocated Channels, it seems that all the Channels were Automatically Allocated, however, in this case, the first two Channels were taken from our Pre-Allocated Channels which means that those two channels have the options that we specified when we Pre-Allocated them, and the third one has generic configuration because we Pre-Allocated only two Channels.
Database Backup with Multi Section
RMAN> run{
Backup Section Size 50M Database format '/home/oracle/Backups/%U';
}2> 3>
Starting backup at 03-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=43 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=41 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/orcl/datafile/system.262.912909191
backing up blocks 1 through 6400
channel ORA_DISK_1: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
....
....
channel ORA_DISK_3: starting piece 1 at 03-SEP-16
channel ORA_DISK_2: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/q2resctp_1_1 tag=TAG20160903T103422 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:00
channel ORA_DISK_1: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/q3resctp_1_1 tag=TAG20160903T103422 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: finished piece 1 at 03-SEP-16
piece handle=/home/oracle/Backups/q1resctp_1_1 tag=TAG20160903T103422 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
Finished backup at 03-SEP-16
RMAN>
The same result than the last example, the first two Channels were taken from our Pre-Allocated Channels which means that those two channels have the options that we specified when we Pre-Allocated them, and the third one has generic configuration because we Pre-Allocated only two Channels.
Conclusion:
- Manually Allocated Channels have highest Priority and overwrite RMAN Parallelism Setting.
- When there are not Manually Allocated Channels and there are Pre-Configured Channels, RMAN Parallel Setting says how many Automatically Allocated Channels will be used. The first Channels automatically allocated will be taken from those Pre-Configured Channels and the rest of Channels will have the generic configuration.
- When there are not Manually Allocated Channels and there are not Pre-Configured Channels, RMAN Parallel Setting says how many Automatically Allocated Channels will be used and all the channels will be automatically allocated with the generic configuration.
- When there are not Manually Allocated Channels and there are not Pre-Configured Channels and RMAN Parallel Setting has the default value (1) then only one Automatically Allocated channel will be used with the generic configuration.
Follow me: