This RMAN feature enables to use multiple nodes parallelly to backup the DB. This will balance the load equally on multiple nodes as well as improves the performance of the backup.
For configuring the number of parallel channel, we can use following command
RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
After allocating the channels, if we execute RMAN backup script, we’ll see channel allocation like
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=104 instance=inst1 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=66 instance=inst1 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=94 instance=inst1 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=40 instance=inst1 devtype=DISK
By default, channels will be allocated from one
node. To split the load across all the nodes in the cluster, individual channels
need special configuration.
So in two-node cluster, we can equally
distribute the load as
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘sys/passwd@inst1′;
CONFIGURE CHANNEL 2 DEVICE TYPE DISK CONNECT ‘sys/passwd@inst1′;
CONFIGURE CHANNEL 3 DEVICE TYPE DISK CONNECT ‘sys/passwd@inst2′;
CONFIGURE CHANNEL 4 DEVICE TYPE DISK CONNECT ‘sys/passwd@inst2′;
For validating the configuration,
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘*’;
CONFIGURE CHANNEL 2 DEVICE TYPE DISK CONNECT ‘*’;
CONFIGURE CHANNEL 3 DEVICE TYPE DISK CONNECT ‘*’;
CONFIGURE CHANNEL 4 DEVICE TYPE DISK CONNECT ‘*’;
Username & passwords will not be
shown.
Now if we again, execute same RMAN script, we
should see channel allocation like
allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=104 instance=inst1 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=66 instance=inst1 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=94 instance=inst2 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=40 instance=inst2 devtype=DISK
This approach can be used to reduce the backup
time.
Caution: Compressed Backup is CPU bound, so
number of channels should be carefully used.
If we reduce the degree of parallelism, let’s
say from 4 to 2
RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;
We’ll have 2 redundant channels. In RMAN setting, they will be shown as ignored
configuration for DISK channel 3 is ignored
configuration for DISK channel 4 is ignored
To remove these extra channels, we can
use
RMAN> CONFIGURE CHANNEL 3 DEVICE TYPE DISK CLEAR;
RMAN> CONFIGURE CHANNEL 4 DEVICE TYPE DISK CLEAR;
you can also allocate multiple channels in RMAN run block
connect target
run {
allocate CHANNEL 1 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p1';
allocate CHANNEL 2 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p1';
allocate CHANNEL 3 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p2';
allocate CHANNEL 4 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p2';
allocate CHANNEL 5 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p3';
allocate CHANNEL 6 DEVICE TYPE disk CONNECT 'sys/bond007##@db279p3';
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 DATABASE FORMAT '/tempe_wdm_migrate/w279_backup/df_t%t_s%s_p%p_%U' TAG=db279p_LEVEL0_BACKUP;
release channel 1;
release channel 2;
release channel 3;
release channel 4;
release channel 5;
release channel 6;
}
No comments:
Post a Comment