Managing File Copies   «Prev  Next»

Lesson 7Parallelization of Image Copies
ObjectiveIdentify why and how to parallelize the creation of Image Copies

Parallelization of Image Copies

Earlier, you learned how to make image copies of files in the database and how to allocate multiple channels to enable parallelization for backups. In this lesson, you will put these two concepts together.
An Oracle Database Administrator (DBA) can make image copies of files in the database in Oracle 12c, and this process can be enhanced by allocating multiple channels to enable parallelization for backup operations.
  1. Allocating Multiple Channels: In Oracle 12c, a DBA can allocate multiple channels to facilitate the backup process. Channels are essentially streams through which Oracle communicates with the backup device, be it disk or tape. By allocating more than one channel, a DBA can enable multiple streams of data to be backed up simultaneously, thereby increasing the efficiency and speed of the backup process.
    The allocation of multiple channels is done using the `ALLOCATE CHANNEL` command in RMAN (Recovery Manager). For instance:
    ALLOCATE CHANNEL ch1 DEVICE TYPE disk;
    ALLOCATE CHANNEL ch2 DEVICE TYPE disk;
    

    This command allocates two channels, `ch1` and `ch2`, for disk backups. By increasing the number of channels, more data files can be backed up in parallel, reducing the overall time taken for the backup process.
  2. Enabling Parallelization for Backup**: Parallelization in Oracle 12c backup operations refers to the ability to perform multiple backup tasks simultaneously. This is directly influenced by the number of channels allocated. When multiple channels are allocated, Oracle RMAN can back up multiple files at the same time, utilizing the available hardware and system resources more effectively. To maximize parallelization, the DBA must ensure that the underlying hardware can support the increased I/O load that results from parallel operations. This includes considering disk I/O capacity, network bandwidth (for network-based backups), and CPU resources.
    In practice, the use of multiple channels and parallelization in Oracle 12c should be carefully planned and configured based on the specific environment and requirements. Factors such as the size of the database, available hardware resources, and the desired backup window must be considered to optimize the backup strategy effectively. The DBA should also regularly monitor the performance of backup operations and adjust the configuration as needed to ensure efficient and reliable backups.


Parallel image Copies

To use parallelism when you create a backup set, you simply have to issue multiple allocate commands and run the backup. The scenario is a bit different when you are making image copies. Recovery Manager can specify only one location for each image file copy created. Because of this limitation, you would issue multiple allocates and then list multiple files in your copy command. An image copy backup that uses multiple channels would use a Recovery Manager script like this:

run {
 allocate channel c1 type disk;
 allocate channel c2 type disk;
 copy
  datafile 'C:\Oracle\DATABASE\  
RCV1ORC1.ORA' to ' D:\backup\RCV1ORC1.ORA', 
datafile 'C:\Oracle\DATABASE\RCVORC1.ORA' 
 
to ' D:\backup\RCVORC1.ORA'; 
}
The image copies will be allocated to the number of channels available. The maximum degree of parallelization depends on the number of channels, not the number of files listed in the copy command. For instance, if you were to allocate three channels and specify six files in the copy command, Recovery Manager would run three copy sessions in parallel. In the next lesson, you will learn about creating operating system image backups.

SEMrush Software