Saturday, April 12, 2014

Parallel Backup of the Same Datafile (Intrafile parallel backup)

RMAN Intrafile Parallel Backup (SECTION SIZE)

This document describes the concept of Intrafile Parallel Backup in Oracle Recovery Manager (RMAN), specifically focusing on the SECTION SIZE feature, which allows for parallel backup of a single large datafile.

Understanding Intrafile Parallel Backup

Traditionally, when you allocate multiple channels in RMAN, each channel backs up a separate datafile. This means that even with several channels, a single large datafile is still backed up by only one channel at a time, which might not fully utilize the parallel capabilities of your backup infrastructure.

Starting with Oracle Database 11g RMAN, the concept of Intrafile Parallel Backup was introduced. This allows RMAN channels to break a single large datafile into smaller, independent units called "sections." Each section can then be backed up concurrently by a different channel, truly parallelizing the backup of a single large file.

How SECTION SIZE Works

The SECTION SIZE clause in the RMAN BACKUP command allows you to specify the maximum size of each section. RMAN will then divide the datafile into chunks of this specified size, and each chunk can be processed by an available channel in parallel.

Example RMAN Command

Here's an example demonstrating how to use SECTION SIZE to back up a large datafile in parallel:

RMAN> run {
2>      allocate channel c1 type disk format '/backup1/%U';
3>      allocate channel c2 type disk format '/backup2/%U';
4>      backup
5>      section size 500m
6>      datafile 6;
7> }

Explanation:

  • allocate channel c1 type disk format '/backup1/%U'; and allocate channel c2 type disk format '/backup2/%U';: These commands allocate two disk channels, c1 and c2, and specify their respective backup destinations (/backup1 and /backup2).

  • backup section size 500m datafile 6;: This is the core command. It instructs RMAN to back up datafile 6. The SECTION SIZE 500m clause tells RMAN to divide datafile 6 into 500MB sections. Each of these sections will then be backed up concurrently by the allocated channels (c1 and c2).

This setup allows for a significant speedup when backing up very large individual datafiles, as multiple channels can work on different parts of the same file simultaneously.

Listing Backed-Up Sections

When a datafile is backed up using SECTION SIZE, the backup pieces reflect these sections.

RMAN> list backup of datafile 6;

Example Output:

...
...
    List of Backup Pieces for backup set 901 Copy #1
    BP Key  Pc# Status      Piece Name
    -------    ---  -----------      ----------
    2007    1   AVAILABLE   /backup1/9dhk7os1_1_1
    2008    2   AVAILABLE   /backup2/9dhk7os1_1_1
    2009    3   AVAILABLE   /backup1/9dhk7os1_1_3
    2009    3   AVAILABLE   /backup2/9dhk7os1_1_4

Notice how the backup pieces (/backup1/9dhk7os1_1_1, /backup2/9dhk7os1_1_1, etc.) correspond to different sections of the datafile. Since each section can go to a different channel, you can direct them to different mount points (like /backup1 and /backup2 in the example), enabling parallel writing to disk or even tape.

Important Consideration for Disk Performance

While SECTION SIZE offers great parallelization benefits, it's crucial to consider the underlying storage.

  • No Advantage on Single Disk: If the large datafile resides entirely on a single physical disk, there is generally no performance advantage to using parallel backups with SECTION SIZE. In such a scenario, the disk head would have to constantly move back and forth to access different sections of the file, which can outweigh the benefits of parallel processing and actually degrade I/O performance.

  • Benefit with Striped/Multiple Disks: The true benefit of SECTION SIZE comes when the large datafile is spread across multiple physical disks (e.g., via RAID, ASM, or striped file systems) or when the backup pieces are written to different physical backup destinations. This allows the parallel I/O operations to be truly concurrent.

Thursday, April 10, 2014

RMAN LEVEL 0 Backup

RUN {
ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; 
ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE'; 
ALLOCATE CHANNEL CH3 TYPE 'SBT_TAPE'; 
ALLOCATE CHANNEL CH4 TYPE 'SBT_TAPE';  
backup incremental level 0 filesperset 1 format '%d_LEVEL0_%s_%t_%p.dbf' database include current controlfile; 
sql 'alter system archive log current'; 
change archivelog all crosscheck; 
backup NOT BACKED UP 1 TIMES archivelog all  filesperset 1 format '%d_arch_%s_%t_%p.arc';
DELETE ARCHIVELOG ALL  BACKED UP 1 TIMES TO DEVICE TYPE sbt COMPLETED BEFORE 'SYSDATE-1/24';
RELEASE CHANNEL CH1; 
RELEASE CHANNEL CH2; 
RELEASE CHANNEL CH3; 
RELEASE CHANNEL CH4;  
}

Monday, April 7, 2014

what you mean by 11.2.0.3.0 (Major release.release.app release #.patch set.PSU)

11.2.0.3.0 : The first digit  is the major release number.  When we say 9i, 10g or 11g we mean the major release number

11.2.0.3.0 : This second digit is the maintenance release number. This is usually called only "release". For example when you say 11g Release 1 or 11g Release 2 in fact you are mentioning maintenance release number. Maintenance releases are full installations. It means that all files are replaced during upgrade. Maintenance releases contain bug fixes and new features for database.

11.2.0.3.0 : This third digit is the release number for Oracle application servers.  For database software, it should be 0.

11.2.0.3.0 : The fourth digit is called component specific release number. It shows the patch set version that has been applied to database. As of 11g, the patch sets are now full installations. They contain bug fixes and add new features to database. However the number of new features is not as high as maintenance releases'. Its scope is limited. This bugs fixed with this patch set are not listed here because applying a patchset is a full installation.

11.2.0.3.0 :The last digit is called platform specific release number. Patch set updates use this fifth number. A patch set update (PSU) is a collection of patches distributed 4 times a year by Oracle (every 3 months). They contain patches for most common bugs and security holes. They don't add a new feature to database. They are not full installations. Only faulty files on your database are replaced. Oracle recommends installing patch sets even if you haven't hit any of the bugs fixed in those patch sets

Wednesday, April 2, 2014

10G R2 New feature

- OCR can now be mirrored ,2 Copies Max
- Voting Disk can be mirrored ,3 Copies Max