Thursday, 16 February 2017

How RMAN utility works internally ?

Recovery Manager or better known as RMAN, is an Oracle client utility that comes pre installed with the Enterprise or Standard edition.
This RMAN executable uses a file called recover.bsq , this file is located in $ORACLE_HOME/rdbms/admin , basically what the executable does, is to interpret the commands you give it , direct server sessions to execute those commands, and record its activity in the TARGET database control file that is being backed up.

The way that the RMAN client directs the server sessions to execute the commands are through channels , a channel represents one stream of data to a device, and corresponds to one database server session. The channel reads data into PGA memory, processes it, and writes it to the output device.
The work of each channel, whether of type disk or System Backup Tape (SBT), is subdivided into the following distinct phases:

1.    Read Phase
A channel reads blocks from disk into input I/O buffers. The allocation of these buffers depend on the number of data files being read simultaneously from disk and written to the same backup piece. One way to control the numbers of files is the backup parameter FILESPERSET
2.    Copy Phase
A channel copies blocks from input buffers to output buffers and performs additional processing on the blocks, like the validation of the data blocks, as it verifies that it's not backing up corrupt data blocks, it's also the phase where it does the binary compression and the backup encryption

3.    Write Phase
A channel writes the blocks from output buffers to storage media. The write phase can be either to SBT or to disk, and these are mutually exclusive, meaning you write to one or the other, not both. 

 Architecture:



No comments:

Post a Comment