Вы находитесь на странице: 1из 8

RMAN : CONFIGURE YOUR RMAN ENVIRONMENT

Posted on February 19, 2014 by Brijesh Gogia


To work with RMAN, you must configure several things, which can be default backup type (disk or tape), the number of channels
you want to use, and the degree of parallelism.
When you are testing it on your personal system, you probably can get by with RMANs default configuration settings.
However, for production jobs involving sophisticated backup strategies, you need to customize RMANs configuration settings
to fulfill all your requirement. You can configure different backup retention policies, for example, for different databases.
EXAMPLE CASE
Oracle Datbase version 11gR2 (11.2.0.4)
A) REQUIREMENTS
We have to meet below requirements for our database:
Database to backup: BRIJ
RMAN Catalog Database: RMANDB
Base recovery catalog owner: rman
1) Backup complete database every night
2) Keep last two Backups only
3) Use Disk for keeping the backup pieces.
4) Control File is to be automatically backed up every time a back up is taken
5) Control file backups are to be stored on disk in the /backups/brij directory.
6) Backups should be made using backup sets
7) Backup pieces should be stored on disk in the /backups/brij directory.
8) Each backup set piece size should be 2GB or smaller
9) Backups should be in compressed format in order to save storage space

B) CHECK THE PRESENT CONFIGURATION


The show all command displays both settings that you have configured and any default settings. Any default settings will
be displayed with a # default at the end of the line. Because RMAN settings are stored in the control file, your target
database must be mounted or open when issuing the show command
RMAN> show all;
RMAN configuration parameters for database with db_unique_name BRIJ are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO %F; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM AES128; # default
CONFIGURE COMPRESSION ALGORITHM BASIC AS OF RELEASE DEFAULT OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /u01/oracle/DB11G/product/11.2.0/dbhome_1/dbs/snapcf_brij.f; # default
Let us first understand each of the current configuration:
i)CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
It means that RMAN retains only one set of backup copies.
ii)CONFIGURE BACKUP OPTIMIZATION OFF; # default
It means that by default RMAN wont skip the backing up of unchanged data blocks in the datafiles OR in other words, It will
NOT allow Oracle to skip backups of files that already have identical backups on the device being backed up to.
iii)CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
It means that by default RMAN sends backup output to a disk drive.
Disk device, disk is the default device type for all automatic channels.
iv)CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
It means that by default RMAN doesnt automatically back up the control files when it performs a backup task.
If you set this parameter to ON, SPFILE will also be automatically included in the control file backup piece. You should keep
it ON and specially it is highly recommended to enable the control file autobackup feature ON if you arent using a recovery
catalog.
Once you make it ON, RMAN will automatically back up your target database control file, as well as the current server
parameter file, during any following events occurs:
Successful completion of backup/copy command
After create catalog command.
Any structural changes (adding/dropping tablespace/datafiles etc) to the database that modify the contents of the control
file
Note: Even when the autobackup feature is disabled, RMAN will back up the current control file and the server parameter file
whenever any backup command includes datafile 1 (system tablespace,) from the datafiles that belong to the target database.
v)CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO %F; # default
%F means the database ID, day, month, year, and sequence
If you havent enabled a flashback area, RMAN will create the autobackups in an operating systemspecific location
($ORACLE_HOME/dbs on Unix)
vi)CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
It means that the default RMAN backup type is a backup set (and not an image copy) and the degree of parallelism is 1. It is
best to allocate only one channel for each physical device on the server.
vii) CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
It means that by default RMAN doesnt make multiple copies of a backup file. Generally this parameter is used if you want to
place one copy of a backup set in two different locations on disk:
viii) CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
It means that by default RMAN doesnt make multiple copies of archivelog file.
ix) CONFIGURE MAXSETSIZE TO UNLIMITED; # default
It means that theres no limit on the size of a backup set by default.
x) CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
It means that by default RMAN backups arent encrypted.
xi) CONFIGURE ENCRYPTION ALGORITHM AES128; # default
By default, RMAN uses the AES 128-bit key algorithm for encryption.
By querying the v$rman_encryption_algorithms view, a list of RMAN encryption algorithms can be obtained:
SQL> select algorithm_id, algorithm_name, algorithm_description, is_default from v$rman_encryption_algorithms;
ALGORITHM_ID ALGORITHM_NA ALGORITHM_DESCRIPTION IS_DEFAULT
-
1 AES128 AES 128-bit key YES
2 AES192 AES 192-bit key NO
3 AES256 AES 256-bit key NO
xii) CONFIGURE COMPRESSION ALGORITHM BASIC AS OF RELEASE DEFAULT OPTIMIZE FOR LOAD TRUE ; # default
You can configure the BASIC compression algorithm.
Only If you have enabled the Oracle Database 11g Release 2 Advanced Compression Option, you can set it to HIGH, MEDIUM & LOW
HIGH: Best suited for backups over slower networks where the limiting factor is network speed.
MEDIUM: Recommended for most environments. Good combination of compression ratios and speed.
LOW: Least effect on backup throughput.
Better backup compression ratios are achieved by consolidating the free space in each data block, and setting that free space
to binary zeroes.
The OPTIMIZE FOR LOAD option controls pre-compression processing. By specifying the default, OPTIMIZE FOR LOAD TRUE, you
ensure that RMAN optimizes CPU usage and avoids pre-compression block processing.
By specifying OPTIMIZE FOR LOAD FALSE, RMAN uses additional CPU resources to perform precompression block processing.
xiii) CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
By default it is disbaled. To specify when archived redo logs are eligible for deletion. This deletion policy applies to all
archiving destinations, including the flash recovery area.
xiv) CONFIGURE SNAPSHOT CONTROLFILE NAME TO /u01/oracle/DB11G/product/11.2.0/dbhome_1/dbs/snapcf_brij.f; # default
Specifying the snapshot controlfile format (File name and location):
A snapshot control file is created by RMAN during the backup process that serves as a point-in-time copy of the database
control file. This will ensure that that backups being taken is consistent to a given point in time.For example, if you add a
datafile or tablespace to a database after the backup has started, (assuming an online backup and before the backup has
ended), that datafile and/or tablespace will not be included in the backup. It is sometimes required that the location and
name of the snapshot control file be changed from its default.
C) CONFIGURE RMAN ENVIRONMENT AS PER REQUIREMENTS
If you want, you can script an entire set of configuration changes and run it from within a run block. Alternatively, you may
execute the configure command from the RMAN command prompt in order to change a single parameter at a time, as shown below.
For the present case we have below requirements to take care:
REQUIRMENT 1 Backup complete database every night
You can create one RMAN script (example below) and run it through cronjobs (if using UNIX/LINUX) every night
You can create below script > /backups/scripts/dbrman_bkup.sh
#########################################
#! /bin/bash
rman target=/ catalog=rman/rman@rmandb << EOF
RUN
{
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
}
EXIT;
EOF
#######################################
NOTE We have added RMAN command DELETE NOPROMPT OBSOLETE;, so every night after backup RMAN will search for OBSOLETE
backups as per this retention policy and delete them.
You can add below crontab entry to run the rman backup every night at 23:00 :
#
# Minute Hour Month Day Month Weekday Command
# 0-59 0-23 1-31 1-12 0-6 (0=Sunday)
#
############################################################
# Database RMAN Backup
############################################################
00 23 * * * /backups/scripts/dbrman_bkup.sh 1>/backups/scripts/dbrman.log 2>&1
REQUIRMENT 2 Keep last two Backups only
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
REQUIRMENT 3 Use Disk for keeping the backup pieces
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
*It is default*
REQUIRMENT 4 Control File is to be automatically backed up every time a back up is taken
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
REQUIRMENT 5 Control file backups are to be stored on disk in the /backups/brij directory
RMAN> configure controlfile autobackup format for device type disk to /backups/brij/controlfile_brij_%F;
REQUIRMENT 6 backups should be made using backup sets
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
*It is default*
REQUIRMENT 7 backups should be stored on disk in the /backups/brij directory
RMAN> configure channel device type disk format /backups/brij/ora_df%t_s%s_s%p;
In the format specification:
%t stands for four-byte time stamp.
%s stands for the backup set number.
%p stands for the backup piece number.
Now all RMAN backups will be made in the /backups/brij directory, even if youve configured a flash recovery area and there
is plenty of free space in it.
REQUIRMENT 8 Each backup set piece size should be 2GB or smaller
RMAN>CONFIGURE CHANNEL DEVICE TYPE disk MAXPIECESIZE 2G
REQUIRMENT 9 backups should be in compressed format in order to save storage space
RMAN> configure device type disk PARALLELISM 1 backup type to compressed backupset;

D) CHECK THE CHANGED CONFIGURATION


Run Show All command again to check the changed RMAN configuration.
RMAN> show all;
RMAN configuration parameters for database with db_unique_name BRIJ are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO /backups/brij/controlfile_brij_%F;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM AES128; # default
CONFIGURE COMPRESSION ALGORITHM BASIC AS OF RELEASE DEFAULT OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /u01/oracle/DB11G/product/11.2.0/dbhome_1/dbs/snapcf_brij.f; # default
NOTE: If you want to clear any of the given configuration, use the configure command with the clear option:
Example:
RMAN> configure controlfile autobackup clear;
RMAN> configure snapshot controlfile name clear;
RMAN> configure backup optimization clear;
RMAN> configure retention policy clear;

[Post Views: 3675]

Read Offline:
Brijesh Gogia
Im an experienced Oracle Applications DBA with more than a decade of full-time DBA experience. I have gained a wide knowledge
of the Oracle software stack and have worked on several big projects for multi-national companies. I enjoy working with the
leading-edge technology and have passion for database performance and stability. Thankfully my work allows me time for researching
new technologies (and to write about them).

You can connect with me on LinkedIn.


Related Posts:
1. RMAN: Basic RMAN Commands
2. RMAN: CONTROL FILE RECOVERY SCENARIOS
3. Oracle Database RMAN Interview Questions
4. RMAN: RECOVERY SCENARIOS RELATED TO DATABASE
5. RMAN: GRANTING RESTRICTED ACCESS USING VIRTUAL PRIVATE CATALOG
6. Multiplex control file in 11gR2 RAC ASM using RMAN
7. RMAN: CREATE THE RECOVERY CATALOG
8. Configure Parallel Concurrent Processing (PCP) in EBS R12
9. KEY ORACLE BACKGROUND PROCESSES RELATED TO BACKUP AND RECOVERY
10. ASM Disk header corruption
Posted in RMAN, RMAN Basics
Post navigation
RMAN: Basic RMAN Commands

RMAN Configurations
June 1, 2011talipozturkLeave a comment
Hi Friends,
In this article Ill explain to you important RMAN configurations. You can do these configurations once and take backups
with these configurations. You can also set special configuration in the backup script.
CONFIGURE RETENTION POLICY
It used with the 2 different options. Recovery Window or Redundancy
Redundancy: CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
If you set Redundancy to 1, RMAN will keep one backup. If you take second backup , RMAN will sign previous backup as
obsolete. You can delete obsolete backup with delete obsolete command.
Recovery Windows: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
If you set Recovey windows to 3 days, RMAN will sign backups as obsolete older than 3 days. For example, we have 4 backups.
And our backup dates are 16 may, 18 may, 21 may and 23 may. If we set Recovery window to 3 days, RMAN must sign 16may and 18
may backups as obsolete (23may 3 days=20may). But RMAN signs 18may backup as not obsolete. Because RMAN automatically
detects backups. And 18may backup is needed for recovery of 20may.
CONFIGURE DEFAULT DEVICE TYPE
Backup can be taken two different locations. Tape and Disk
For backing up to disk: CONFIGURE DEFAULT DEVICE TYPE TO DISK;
For backing up to tape: CONFIGURE DEFAULT DEVICE TYPE TO SBT;
CONFIGURE CONTROLFILE AUTOBACKUP ON/OFF
Automatically backups the controlfile to fra. (If you dont set FRA then it puts backup of controlfile to $ORACLE_HOME/dbs by
default)
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO %F
By default, RMAN automatically names control file backups and saves them into FRA. To configure RMAN to write control file
backups to the specific directory: %F will generate a unique filename likes c-IIIIIIIIII-YYYYMMDD-QQ .
Here IIIIIIIIII is DBID, YYYYMMDD is date and QQ is hexadecimal id. You can also backup controlfile to specific
location. For example;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ora_home/oradata/cf_%F;
You can also reset configuration.
CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE TYPE DISK CLEAR;
You can also write in RUN script.

RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'controlfile_%F';
RMAN> BACKUP AS COPY DATABASE;
RMAN> RUN {
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/%F.bck';
BACKUP AS BACKUPSET DEVICE TYPE DISK DATABASE;
}

Format Aklamas
%a Specifies the activation id number of the database.
%A Specifies the activation id number of the database completed 0
%c Specifies the copy number of the backup piece within a set of duplexed backup pieces. The maximum value is 256.
%d Specifies the name of the database
%D Specifies the current day of the month in format DD
%e Specifies the archived log sequence number
%f Specifies the absolute file number
%F Combines the DBID, day, month, year, and sequence into a unique and repeatable generated name
%h Specifies the archived redo log thread number
%I Specifies the DBID
%M Specifies the month in format MM
%n Specifies the name of the database. padded on the right with x characters to a total length of eight characters.
%N Specifies the tablespace name.
%p Specifies the piece number within the backup set
%r Resetlogs ID
%s Specifies the backup set number
%S Specifies the backup set number completed 0
%t Specifies the backup set time stamp.
%T Specifies the year, month, and day in format YYYYMMDD
%u Specifies an 8-character name constituted by compressed representations of the backup set or image copy number.
%U Specifies a system-generated unique file name.
%Y Specifies the year in this format: YYYY.
CONFIGURE BACKUP OPTIMIZATION OFF/ON
If you set this configuration to ON then the backup command skips backing up files when the identical file has already been
backed up. RMAN uses to determine whether a file is identical to a file that it is backed up with following criterias.
Dosya tipi Ayn dosya olup olmadn anlama kriteri
Datafile The data file must have the same dbid, SCN, creation SCN, and RESETLOGS SCN and time as a data file in a
backup
Archive log Same DBID, thread, sequence number and RESETLOGS SCN and time
file
Backup set Same backup set recid and stamp.
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET
Specifies number of channels which determines whether RMAN reads or writes in parallel. You must also specify DEVICE TYPE.
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3
The configure datafile backup copies used to specify how many copies of each backup piece should be created on the
specified device type for the datafile. In my example above, it will take backup 3 copy. It is known as mirror backup. You
can specify 3 different location with FORMAT option.
BACKUP DEVICE TYPE DISK COPIES 3 DATAFILE 7 FORMAT
/tmp/%U,?/oradata/%U,?/%U;

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1


The configure archivelog backup copies used to specify how many copies of each backup piece should be created on the
specified device type for the arhive log files. You can specify 2 different location with FORMAT option.
CONFIGURE MAXSETSIZE TO UNLIMITED
You can use the MAXSETSIZE parameter on the BACKUP and configure commands to set a limit for the size of backup sets. If you
set maxsetsize less than backing up datafile size then you will get an error. Default value of this configuration is
unlimited.
CONFIGURE ENCRYPTION FOR DATABASE OFF/ON
Encrypted backups cannot be read if they are obtained by unauthorized users. This configuration specifies whether encryption
will be used or not.
CONFIGURE ENCRYPTION ALGORITHM AES128
CONFIGURE COMPRESSION ALGORITHM BASIC AS OF RELEASE DEFAULT OPTIMIZE FOR LOAD TRUE
There are two compression method ZLIB and BZIP2. ZLIB consumes less cpu but the compression rate is low. BZIP2 consumes more
cpu but the compression rate is high.
CONFIGURE COMPRESSION ALGORITHM ZLIB;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
There are 3 compression level. LOW, MEDIUM and HIGH. HIGH level is not recommended because of suited for backups over slower
networks. MEDIUM level is recommended.
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE
Specifies the archive log deletion policy.
In 10g you can set;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO {ARCHIVERETENTION};
In 11g you can set;
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
The archived log deletion policy also has option specific to Data Guard. For example, if you set archive log deletion policy
to the APPLIED ON STANDBY then RMAN can delete logs after they have been applied at all mandatory remote destinations.
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE
You can use maxpiecesize channel parameter to set limits on the size of backup pieces. In my example below, I limit the
backup piece size to 2G.
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE = 2G;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /oracle/ora10g/dbs/snapcf_test11g.f
RMAN needs a snapshot control file when resynchronizing with the recovery catalog or taking a backup of the current control
file. The default location is platform specific and depends on the Oracle home of each target database. In Linux environment
it locates in $ORACLE_HOME/dbs directory. You can change its location with this configuration.

Do you know how your Oracle RMAN backup works?


Recovery Manager or better known as RMAN, is an Oracle client utility that is installed with the Enterprise or Standard edition, you can also
find it with the Admin option when installing the Oracle Client.

In it's most basic form, the RMAN client connects, an it needs to be with a "sysdba" privileged user, to the database that is being backed up,
called a TARGETdatabase, this client, is an executable that is normally found in $ORACLE_HOME/bin.

By being a client side utility, it allows you to use one RMAN executable version to backup current and previous versions of the Oracle
Database, there are some restrictions to this though, which can be verified in MOS document RMAN Compatibility Matrix [ID 73431.1].

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.

There are two main SYS packages that do the work of backup and recovery, which are DBMS_RCVMAN, this has the procedures which list
your database incarnations, the set until time recovery window, list your backups, to name a few, and DBMS_BACKUP_RESTORE , which as
you might have guessed is the one who does the backup and recovery operations, like create the control file snapshot , backup the datafiles ,
backup the spfile to name some.

As mentioned above, 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 datafiles 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.
As you can see by the phases above, and what distinguishes RMAN from any other method, is that the backup is at the block level, as to the
user managed backups, it brings great advantages , as it wont have to backup empty blocks.

One great way to see how your backup works, is to do a trace, here you will see everything that has been mentioned above

oracle@servidor1.oracleenespanol.blogspot.com [TESTDB] /home/oracle/bin


oracle $ rman target / debug trace=backup.trc

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Dec 13 09:42:01 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

RMAN-06005: connected to target database: TESTDB (DBID=2580834116)

RMAN> backup database plus archivelog;

Once the backup finishes, you can search the trace file and see what it is actually doing, here is an example of the RCVMAN fetching
the incarnation information:

DBGRCVMAN: Fetching incarnation records


DBGRCVMAN: incarnation record id=0
DBGRCVMAN: icprs=0,icprc=
DBGRCVMAN: icrls=1,icrlc=Oct 24 2012 09:26:28
DBGRCVMAN: icrlc_i=797505988
DBGRCVMAN: icpinc=0
DBGRCVMAN: icflg=CURRENT
DBGRCVMAN: number of incarnation=1
DBGRCVMAN: canApplyAnyRedo is set to TRUE
DBGRCVMAN: canConvert_Cf is set to TRUE
DBGRCVMAN: canHandleTransportableTbs is set to TRUE

Below you can see the RPC calls being done by DBMS_BACKUP_RESTORE and the IO information by the INPUT buffers and the
OUTPUT buffers.

DBGRPC: krmxr - channel ORA_DISK_1 calling peicnt


DBGRPC: krmxrpc - channel ORA_DISK_1 kpurpc2 err=0 db=target proc=SYS.DBMS_BACKUP_RESTORE.BACKUPPIECECREATE excl: 0
DBGRPC: krmxrpc - channel ORA_DISK_1 kpurpc2 err=0 db=target proc=SYS.DBMS_BACKUP_RESTORE.PIECECONTEXTGETNUMBER
excl: 0
DBGRPC: krmxrpc - channel ORA_DISK_1 kpurpc2 err=0 db=target proc=SYS.DBMS_BACKUP_RESTORE.BACKUPCANCEL excl: 0
DBGIO: Type %Comp Blocks Tot Blocks Blksize ElpTime(s) IO Rt(b/s) Name [09:43:14.946] (krmkqio)
DBGIO: ---- ----- ---------- ---------- ---------- ---------- ---------- ----- [09:43:14.946] (krmkqio)
DBGIO: IN 3.6 2304 64000 8192 0 0
/mount/u01/oracle/TESTDB/data/undotbs1_01.dbf [09:43:14.946] (krmkqio)
DBGIO: IN 90.0 11520 12800 8192 0 0 /mount/u01/oracle/TESTDB/data/sysaux01.dbf
[09:43:14.947] (krmkqio)
DBGIO: IN 51.9 33216 64000 8192 2 136052736 /mount/u01/oracle/TESTDB/data/system01.dbf
[09:43:14.947] (krmkqio)
DBGIO: IN 59.7 38208 64000 8192 2 156499968 /mount/u01/oracle/TESTDB/data/users01.dbf
[09:43:14.947] (krmkqio)
DBGIO: OUT 39224 8192 2 160661504
/mount/oracle/copy01/flash_recovery_area/TESTDB/TESTDB/backupset/2012_12_13/o1_mf_nnndf_TAG20121213T094259_8dmtcn0w_.bkp
[09:43:14.947] (krmkqio)
DBGIO: AGG 85248 8192 2 349175808 [09:43:14.947] (krmkqio)
DBGMISC: ENTERED krmzlog [09:43:14.948]
RMAN-08044: channel ORA_DISK_1: finished piece 1 at Dec 13 2012 09:43:14

I hope this helps you understand more how your backup works, and this is just the super condensed version, there is a lot of information
missing, like how RMAN allocates the IN and OUT buffers, or how the disk writes are differentiated from the SBT writes, so go out there and
see it yourself.

Also some of the information for this entry came from these two great books:

Oracle RMAN 11g Backup and Recovery

Oracle Database Backup and Recovery User's Guide 11g Release 2 (11.2)

Publicado 13th December 2012 por Rene Antunez

Вам также может понравиться