You are on page 1of 51

<Insert Picture Here>

RMAN
Tanmay Mehrotra
Oracle ACS-SSE

Agenda
RMAN Basics
11gR2 RMAN New Features
Basic Debugging
Tuning RMAN Performance
RMAN Best Practices
RMAN Backup Strategy for VLDB
Q&A

Take Away

Basics
What is RMAN?
Recovery MANager is an Oracle Database client
that performs backup and recovery tasks on your
databases and automates administration of your
backup strategies. It greatly simplifies backing up,
restoring, and recovering database files.

RMAN doesn't require an extra license or


installation, it comes as a standard utility when
you install the Oracle binaries. RMAN is available
since version 8.0

Basics
RMAN Purposes:
Data protection physical backups of your database
Data preservation a copy for year end accounting
Data transfer move a database from one platform to
another

Basics
RMAN Benefits:
Incremental backups that only copy data blocks that have changed since the last backup
Tablespaces are not put in backup mode, thus no extra redo log is generated during online
backups
Detection of corrupt blocks during backup
Parallelisation of I/O operations
Automatic logging of all backup and recovery operations
Built in reporting and listing commands
Integration with Media Management Layer (MML)
Compression
Encryption
Duplication

Cross-platform data conversion

Selecting the Right Tool


Feature

RMAN

User-Managed

Data Pump Export

Closed database backups Supported. Requires instance to be mounted.

Supported.

Open database backups

Supported. No need to use BEGIN/END BACKUP


statements.

Supported. Must use Requires rollback or undo


BEGIN/END
segments to generate consistent
BACKUP statements. backups.

Incremental backups

Supported.

Not supported.

Not supported.

Corrupt block detection

Supported. Identifies corrupt blocks and logs in


V$DATABASE_BLOCK_CORRUPTION.

Not supported.

Supported. Identifies corrupt


blocks in the export log.

Automatic specification of Supported. Establishes the name and locations of all


files to include in a backup files to be backed up (whole database, tablespaces,
datafiles, control files, and so on).

Not supported.

Not supported. Files Not applicable.


to be backed up must
be located and copied
manually.

Backup repository

Supported. Backups are recorded in the control file,


Not supported. DBA
which is the main repository of RMAN metadata.
must keep own
Additionally, you can store this metadata in a recovery records of backups.
catalog, which is a schema in a different database.

Not supported.

Backups to a media
manager

Supported. Interfaces with a media manager. RMAN


also supports proxy copy, a feature that allows a
media manager to manage completely the transfer of
data between disk and backup media.

Supported. Backup to Not supported.


tape is manual or
controlled by a media
manager.

Backup of initialization
parameter file

Supported.

Supported.

Not supported.

Backup of password and


networking files

Not supported.

Supported.

Not supported.

Platform-independent
language for backups

Supported.

Not supported.

Supported.

Basics
Critical components of RMAN:
RMAN executable
Server processes
Channels
Target database
Backups, backup sets, and backup pieces
Recovery catalog database (optional)

Media Management Layer (optional)

Basics-Oracle RMAN Architecture


Target
Instance
Server
Session
(default)
Enterprise
Manager

Server
Session
(polling)

MML

Fixed tables
And views

Disk
Server
Session
(channel)

Tape

Media Manager
Recovery
Catalog

DBMS_RCVMAN
DBMS_BACKUP_RESTORE

RMAN

Server
Session
(Catalog)

Target
Controlfile

Tape

Server
Session
(channel)

Target
Database
Files

Basics-The Backupset
There are three types of backup sets:
Data file backup sets
Can include the control files
Can be Incremental or Full backups
Archivelog backup sets
Contains archived log files only
Control File Autobackup
Contains Control file and Spfile
Backup Set 1
Datafile 1

Datafile 3
Control
File

Backup Set 2

Backup Set 3

Datafile 2
Datafile 1

Datafile 1
Datafile 3

Control
File

Datafile 2

Datafile 2
Datafile 4

SPFILE

Datafile 4

SPFILE

Basics-Backup Piece
A backup piece is a file in a backup set.
A backup piece can contain blocks from more
than one datafile.
A backup piece consists of one or more physical
output files contained within a backup set.
Backup Set 1 (Logical)
Piece 1
Datafile 1

Piece 2
Datafile 2

Backup Set 2 (Logical)


Piece 1
Datafile 3

Datafile 4

Basics-Oracle Channels

A channel is a stream of data to a device type.


A channel connects RMAN to a database instance
by starting a server session on the instance
The Media Manager Server communicates with the
interface module to manage storage.
Disk
Server
Session
(channel)

Tape

Media Manager

Server
Session
(channel)

Target
Database
Files

Allocating Channels
Set various channel limit parameters that apply to
operations performed by the allocated server
session
Force RMAN to create multiple backup pieces.
Prevent RMAN from consuming too much disk bandwidth.
Prevent RMAN from opening too many input files at once.

readrate

Specifies the maximum number of buffers per second read from each
input datafile--prevent RMAN from consuming too much bandwidth
during backups.

maxopenfiles

Determines the maximum number of input files that a backup or copy


can have open at a given time--controls the number of open files

Setting Duration and Throttling Option


Copy database
in 10 hours
with minimum
impact
Backup
tablespace
in four hours
Backup as
many files as
possible
in four hours

RMAN> BACKUP AS COPY


2> DATABASE DURATION 10:00
3> MINIMIZE LOAD ;

RMAN> BACKUP TABLESPACE USERS


2> DURATION 4:00
3> FILESPERSET 1;

RMAN> BACKUP DATABASE PARTIAL


2> DURATION 4:00
3> FILESPERSET 1;

Parallelizing RMAN
Backup sets are parallelized by allocating multiple
channels or using the configure command for
automatic channel allocation.
Backup Set 1
Datafile 1

Datafile 2

Datafile 3

Backup Set 2
Datafile 4

Datafile 5

Datafile 6

Server
Session
(channel)

Server
Session
(channel)

Media
Manager Tape

Media
Manager Tape

Automatic Channel Failover

RMAN
backup process

RMAN
backup process

11gR2 RMAN New Features

Backup Performance Enhancements


Backup optimization
Parallel backup/restore for VLF
Active database Duplication
Archival backup
Recovery Catalog Enhancements
Data Recovery Advisor
Automatic Block Repair
Other Enhancements

<Insert Picture Here>

Backup Performance Enhancements


Faster incremental backups on physical standby database by enabling
block change tracking
-- Enable block change tracking
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE <file> REUSE;
-- Disable block change tracking
ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

New backup compression algorithm ZLIB


ZLIB
Optimized for CPU efficiency (40% faster than algorithm BZIP2)
BZIP2 (default)
Optimized for maximum compression
For supported compression algorithms, check
V$RMAN_COMPRESSION_ALGORITHM

Backup Performance Enhancements /Cont.


select ALGORITHM_NAME,.. from V$RMAN_COMPRESSION_ALGORITHM;
Algorithm
Name
---------BASIC
LOW
MEDIUM
HIGH

Initial
Terminal
Algorithm Database
Rease
Release
ALGORITHM_DESCRIPTION
Compatible Compatibil Valid
ACO
---------- ---------- --------------------------------------------- ---------- ---------- -------- --10.0.0.0.0
good compression ratio
9.2.0.0.0 10.2.0.3.0 YES
NO
11.2.0.0.0
maximum possible compression speed
11.2.0.0.0 10.2.0.3.0 NO
YES
11.2.0.0.0
balance between speed and compression ratio
11.0.0.0.0 10.2.0.3.0 NO
YES
11.2.0.0.0
maximum possible compression ratio
11.2.0.0.0 10.2.0.3.0 NO
YES

RMAN> CONFIGURE COMPRESSION ALGORITHM TO [BASIC|LOW|MEDIUM|HIGH];


RMAN> SET COMPRESSION ALGORITHM TO [BASIC|LOW|MEDIUM|HIGH];

Improved block media recovery performance


RMAN10g> BLOCKRECOVER DATAFILE 8 BLOCK 13 DATAFILE 2 BLOCK 19;
RMAN11g> RECOVER CORRUPTION LIST;
RMAN11g> RECOVER DATAFILE 8 BLOCK 13 TO 23;
RMAN11g> RECOVER TABLESPACE users DBA 9999;

Backup Performance Enhancements /Cont.


Parallel Backup/Restore for VLF

SECTION SIZE
Serially or in parallel
Same size of sections except maybe last section
COMPATIBLE must be 11.0
Max 256 sections
Automatically enabled and no additional installation required

RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 4;


RMAN> BACKUP SECTION SIZE 250[M | K | G] TABLESPACE USERS;

Backup Optimization
Undo backup optimization
Backup failover for arch logs in the flash recovery area
Archived log deletion policy enhancements
# Oracle 10g Syntax.
CONFIGURE ARCHIVELOG DELETION POLICY {CLEAR | TO {APPLIED ON STANDBY | NONE}}
# Oracle 11g Syntax.
ARCHIVELOG DELETION POLICY {CLEAR |
TO {APPLIED ON [ALL] STANDBY |
BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier |
NONE |
SHIPPED TO [ALL] STANDBY}

Database Duplication
Network-enabled database duplication without
backups
Network-enabled database duplication for standby
without backups
Source database backup not needed on destination
server
RMAN> DUPLICATE TARGET DATABASE [TO dupdb | FOR STANDBY]
DBID 8675309
FROM ACTIVE DATABASE
PASSWORD FILE # (by default will be copied for standby duplication)
SPFILE
PARAMETER_VALUE_CONVERT '/disk1', '/disk2;
SET DB_FILE_NAME_CONVERT '/disk1','/disk2
SET LOG_FILE_NAME_CONVERT '/disk1','/disk2
SET SGA_MAX_SIZE 200M
SET SGA_TARGET 125M
SET DB_UNIQUE_NAME=prdsby
reset dg_broker_start
NOFILENAMECHECK

Long-term Backups
Override the retention policy
Contains all necessary files to restore/recover the
database
RMAN> BACKUP TAG Q107 DATABASE KEEP FOREVER;
RMAN> BACKUP KEEP UNTIL TIME '01-JAN-08' ARCHIVELOG ALL;
RMAN> CHANGE BACKUP OF ARCHIVELOG ALL NOKEEP;

Recovery Catalog Enhancements


Merge recover catalog
rman catalog rcat/rcat@11gcat
1- RMAN> import catalog rman/rman@rcvcat10
2- RMAN> import catalog rman/rman@rcvcat10 dbid=01234, 56789
3- RMAN> import catalog rman/rman@rcvcat10 db_name=db1, db2
4- RMAN> import catalog rman/rman@rcvcat10 NO UNREGISTER
5- RMAN> import catalog rman/rman@rcvcat10 dbid=01234, 56789 NO UNREGISTER
6- RMAN> import catalog rman/rman@rcvcat10 db_name=db1, db2 NO UNREGISTER

rman catalog rman/rman@rcvcat10


RMAN> upgrade catalog;
RMAN> exit

Recovery Catalog Enhancements Cont.


Virtual Private Catalog (VPC)
#
#
#

#
#

SQL> CREATE TABLESPACE VPCCAT DATAFILE '/u01/oradata/rcvcat/vpccat.dbf' SIZE 10M;


SQL> CREATE USER vpc1 IDENTIFIED BY vpc1 DEFAULT TABLESPACE VPCcat;
SQL> GRANT recovery_catalog_owner TO vpc1;
connect to recovery catalog as base recovery catalog owner
$ rman catalog rcat/rcat@rcvcat
grant the metadata access to vpc owner (vpc1) on a specific already registered target DB
RMAN> GRANT CATALOG FOR DATABASE test11g TO vpc1;
or you can grant VPC owner (vpc1) the ability to register new database in his vpc
RMAN> GRANT REGISTER DATABASE TO vpc1;
RMAN> exit
log into RMAN using the vpc owner and issue the CREATE VIRTUAL CATALOG
rman catalog vpc1/vpc1@rcvcat
RMAN> CREATE VIRTUAL CATALOG;
at this point vpc1 is ready to backup/restore the granted 11g database, however if the
target database is earlier than 11g
$ sqlplus vpc1/vpc1@rcvcat
SQL> EXEC RCAT.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;
$ rman catalog rcat/rcat@rcvcat
RMAN> GRANT CATALOG FOR DATABASE test10g TO vpc1;

Recovery Catalog Enhancements Cont.


Revoke VPC
# connect to recovery catalog as base recovery catalog owner
$ rman catalog rcat/rcat@rcvcat
RMAN> REVOKE CATALOG FOR DATABASE test11g FROM vpc1;
RMAN> REVOKE CATALOG FOR DATABASE test10g FROM vpc1;
RMAN> REVOKE REGISTER DATABASE FROM vpc1;

Dropping VPC
# connect to recovery catalog as VPC owner
$ rman catalog vpc1/vpc1@rcvcat
RMAN> DROP CATALOG;
# If the target database for pre-11g
$ sqlplus vpc1/vpc1@rcvcat
SQL> EXEC RCAT.DBMS_RCVCAT.DROP_VIRTUAL_CATALOG;
# Optionally drop the vpc owner from the database
SQL> conn / as sysdba
SQL> drop user vpc1 cascade;

Data Recovery Advisor


List Failure [ALL | CRITICAL | HIGH | LOW | CLOSED | EXCLUDE FAILURE {F#} | DETAIL]
Stopping background process SMCO
Shutting down instance: further logons disabled
Read of datafile '/u02/oradata/test11g/users01.dbf' (fno 4) header failed with ORA-01210
Hex dump of (file 4, block 1) in trace file /u01/app/oracle/diag/rdbms/test11g/test11g/trace/test11g_ora_14850.trc
Corrupt block relative dba: 0x01000001 (file 4, block 1)
Completely zero block found during datafile header read
Rereading datafile 4 header failed with ORA-01210
Hex dump of (file 4, block 1) in trace file /u01/app/oracle/diag/rdbms/test11g/test11g/trace/test11g_ora_14850.trc
Corrupt block relative dba: 0x01000001 (file 4, block 1)
Completely zero block found during datafile header read
RMAN> list failure detail;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- ------542
HIGH OPEN
25-NOV-09 One or more non-system datafiles are corrupt
Impact: See impact for individual child failures
List of child failures for parent failure ID 542
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- ------545
HIGH OPEN
25-NOV-09 Datafile 4: '/u02/oradata/test11g/users01.dbf' is corrupt
Impact: Some objects in tablespace USERS might be unavailable

Data Recovery Advisor Cont.


Advise Failure [ALL | CRITICAL | HIGH | LOW | EXCLUDE FAILURE {F#}]
mandatory or optional Manual
Automated
RMAN> ADVISE FAILURE;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- ------142
HIGH OPEN
23-APR-07 One or more nonsystem datafiles are missing
101
HIGH OPEN
23-APR-07 Datafile 1:
'/disk1/oradata/prod/system01.dbf' contains one or
more corrupt blocks
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /disk1/oradata/prod/users01.dbf was unintentionally
renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ -----------------1
Restore and recover datafile 28; Perform block media
recovery of block 56416 in file 1
Strategy: The repair includes complete media recovery with
no data loss
Repair script:
/disk1/oracle/log/diag/rdbms/prod/prod/hm/reco_6605
00184.hm

RMAN> Advise Failure ;


List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- ------542
HIGH OPEN
25-NOV-09 One or more non-system datafiles are
corrupt
Impact: See impact for individual child failures
List of child failures for parent failure ID 542
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- ------545
HIGH OPEN
25-NOV-09 Datafile 4:
'/u02/oradata/test11g/users01.dbf' is corrupt Impact: Some objects in
tablespace USERS might be unavailable

analyzing automatic repair options; this may take some time


Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
no manual actions available
Automated Repair Options
========================
Option Repair Description
------ -----------------1
Restore and recover datafile 4
Strategy: The repair includes complete media recovery with no data loss
Repair script:
/u01/app/oracle/diag/rdbms/test11g/test11g/hm/reco_1978378021.hm

Data Recovery Advisor Cont.


Repair Failure [USING ADVISE OPTION {o#}| NOPROMPT | PREVIEW]
RMAN> Repair Failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/test11g/test11g/hm/reco_1978378021.hm
contents of repair script:
# restore and recover datafile
sql 'alter database datafile 4 offline';
restore datafile 4;
recover datafile 4;
sql 'alter database datafile 4 online';
Do you really want to execute the above repair (enter YES or NO)?

Change Failure

[ALL | CRITICAL | HIGH | LOW | EXCLUDE FAILURE {F#}]

RMAN> CHANGE FAILURE 5 PRIORITY LOW;


RMAN> CHANGE FAILURE 5 CLOSE;

Other Enhancements
Enhanced TSPITR (dropped TS)
Improved block corruption detection
# Check for physical corruption of all database files.
RMAN> VALIDATE DATABASE;
# Check for physical and logical corruption of a tablespace.
RMAN> VALIDATE CHECK LOGICAL TABLESPACE USERS;
# Check for physical and logical corruption of a datafile.
RMAN> VALIDATE CHECK LOGICAL DATAFILE 4;
# Check for physical corruption of all archived redo logs files.
RMAN> VALIDATE ARCHIVELOG ALL;
# Check for physical and logical corruption of the controlfile.
RMAN> VALIDATE CHECK LOGICAL CURRENT CONTROLFILE;
# Check for physical and logical corruption of a specific backupset.
RMAN> VALIDATE CHECK LOGICAL BACKUPSET 3;
# Check for physical corruption of files to be backed up.
RMAN> BACKUP VALIDATE DATABASE ARCHIVELOG ALL;
# Check for physical and logical corruption of files to be backed up.
RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;
# Check for physical corruption of files to be restored.
RMAN> RESTORE VALIDATE DATABASE;
# Check for physical and logical corruption of files to be restored.
RMAN> RESTORE VALIDATE CHECK LOGICAL DATABASE;

Automatic Block Repair


Oracle Database 11g Release 2
Allows corrupt blocks on the primary database to be automatically
repaired from physical standby database, as they are detected.
In-line and transparent. User sees brief wait from query on corrupt
block while it is being repaired.
Can also be performed on-demand via RECOVER command
Requires Active Data Guard (real-time query on physical standby
database).
Automatic Block
Repair

Queries
Primary
database

Active Data Guard


Standby

Other Enhancements

SET NEWNAME
10G
SET NEWNAME FOR DATAFILE|TEMPFILE .. TO ..
11G
SET NEWNAME for database {%b, %f, and %U} | tablespace {%b, %f, and %U} | datafile | tempfile

Other options can be used


%I = DBID
%N = TS Name
1.
2.
3.

SET NEWNAME FOR DATAFILE 1 TO '/oradata1/system01.dbf';


SET NEWNAME FOR TABLESPACE users TO '/oradata%f/%b';
SET NEWNAME FOR DATABASE TO '/oradata/%U'

Recover from loss of Spfile


SQL> create spfile=?/?/?/spfile<dbname>.ora from pfile=?/?/?/init<dbname>.ora;
SQL> create spfile=?/?/?/spfile<dbname>.ora from memory;

Basic Debugging Files to Collect


Full RMAN Script/command in question
Full RMAN log covering events for RMAN script/command
RDBMS Alert log covering backup/restore operation window.
RMAN debug trace covering backup/restore operation.
Trace files / Core dump files may be automatically produced when media
managers fail. Check the Target instance alert log and look for these in
USER_DUMP_DEST
or
$ORACLE_HOME/dbs
or
$ORACLE_HOME/rdbms/log
Media Manager Logs , Check with Media Manager Vendor for locations of
specific media manager error logs.
AWR & OSW logs in case of performance issues.

Basic Debugging - Tracing


There are 3 tracing options
1st is a generic tracing , this usually helps help in nailing down most
common RMAN issues.
$ rman target $$$Connection Details $$$$ catalog
$$$Connection Details $$$$ debug all trace= $$$$ Trace
Location $$$$ log= $$$$ Log Location $$$$$
RMAN> run-your-commands / call RMAN script;
RMAN> exit;

Basic Debugging - Tracing


2nd is 10046 trace.
$ rman target $$$Connection Details $$$$ catalog $$$Connection
Details $$$$ debug trace= $$$$ Trace Location $$$$ log= $$$$ Log
Location $$$$$
RMAN> sql "alter session set tracefile_identifier=''rman_10046''";
RMAN> sql "alter session set events ''10046 trace name context
forever,level 12''";
RMAN> run-your-commands / call RMAN script;
RMAN> exit;
The 10046 trace-file can be found in the directory defined by
USER_DUMP_DEST initialization parameter of the target database with
the identifier 'rman_10046' suffixed to the trace-file name.

Basic Debugging - Tracing


3rd is RMAN channels tracing , this will help in nailing down I/O
issues. Trace-files for channel tracing will be generated in
USER_DUMP_DEST
Disk Channel:
run {
allocate channel ch1 type disk DEBUG=5 TRACE=1;
your-commands; }
Tape Channel:
run {
allocate channel ch1 type sbt DEBUG=5 TRACE=5;
your-commands; }

Basic Debugging - Tracing

Test

Tuning RMAN Performance


An RMAN backup or restore job can be divided into separate phases
or components. The slowest of these phases in any RMAN job is
called the bottleneck. Bottlenecks has to be identified for a given job
and use RMAN commands, initialization parameters, or adjustments to
physical media to improve performance.

Tuning RMAN Performance


The work of each channel, whether of type disk or System Backup Tape
(SBT), is subdivided into the following distinct phases:
Read Phase
A channel reads blocks from disk into input I/O buffers.
Copy Phase
A channel copies blocks from input buffers to output buffers and
performs additional processing on the blocks.

Write Phase
A channel writes the blocks from output buffers to storage media. The
write phase can take either of the following mutually exclusive forms,
depending on the type of backup media:
Write Phase for System Backup Tape (SBT)
Write Phase for Disk
When restoring data, a channel performs these steps in reverse order and
reverses the reading and writing operations.

Tuning RMAN Performance


Phases of a Multichannel Backup to Tape

Tuning RMAN Performance


Follow the steps in sequential order.
Step 1: Remove the RATE Parameter from Channel Settings
Step 2: If You Use Synchronous Disk I/O, Set DBWR_IO_SLAVES
Step 3: If You Fail
LARGE_POOL_SIZE

to

Allocate

Shared

Step 4: Tune the Read, Write, and Copy Phases

Memory,

Set

RMAN Performance Tuning Using Buffer


Memory Parameters

These steps are targeted to systems where the available I/O exceeds
100 MB/s, while memory, CPU, network consumption, and tape drive
throughput do not constrain overall RMAN performance. This is
especially true in very high performance configurations, such as
Exadata. In these environments, the default RMAN buffer sizes are
usually inadequate and should be increased.

RMAN Performance Tuning Using Buffer


Memory Parameters - RMAN Buffer Usage
During backup, datafile blocks are read into a set of input
buffers, where they are validated/compressed/encrypted
and copied to a set of output buffers. The output buffers
are then written to backup pieces on either disk or tape
(DEVICE TYPE DISK or SBT).

Conversely, on restore, blocks are read from the backup


piece into a set of input buffers, where they are
validated/uncompressed/decrypted and copied to a set of
output buffers. The output buffers are then written back to
data files on disk.

RMAN Performance Tuning Using Buffer


Memory Parameters

RMAN Performance Tuning Using Buffer


Memory Parameters - RMAN Buffer Usage
By default, buffers are allocated from the PGA, unless DISK or TAPE
I/O slaves are used, in which case buffers are allocated from the SGA
or large pool (if LARGE_POOL_SIZE is set). For overall performance
benefit , it is advisable to set LARGE_POOL_SIZE
The number and size of the buffers used for each RMAN job can be
found
in
the
views
V$BACKUP_ASYNC_IO
and
V$BACKUP_SYNC_IO.
The number and size of input & output buffers can be changed by
using parameters _backup_ksfq_bufcnt , _backup_ksfq_bufsz ,
BLKSIZE & _db_file_direct_io_count. Usage of these parameter will
vary from based on type of operation performed 1.e backup , restore ,
backup/restore on restore , backup/restore on tape , storage on
coocked file system , storage on ASM.

RMAN Best Practices


Start with
---------------------- Meeting recovery SLAs?
Reducing exposure to data loss?
Meeting backup windows?
Dealing with long-term backup storage?
Management complexity?
Budget?
Every second of downtime/uptime cost $, so plan accordingly.
End with
----------------------- A good backup policy which full fills all above criteria , go through multiple
regression testing , testing , testing & testing , so that your backups can be
restored when they are needed. That's it...

~~~~Ability Without Dependability is Always Liability~~~~

RMAN Backup Strategy for VLDB

Very Large Database (VLDB) Backup & Recovery Best Practices :


http://www.oracle.com/technetwork/database/features/availability/vldbbr-128948.pdf
Starbucks RMAN Performance Tuning Case Study :
http://www.oracle.com/technetwork/database/availability/starbucksrman-perf-tuning-452541.pdf

Q&A

Tanmay.Mehrotra@oracle.com

Take Away
Turn on block checking
To detect corrupt blocks as early as possible
alter system set db_block_checking = true scope=both;

Turn on block tracking


To reduce the amount of time required for incremental backups
alter database enable block change tracking;

Duplex log groups and members


Mitigate risk of lost or corruption of redo/archive logs
alter system set
log_archive_dest_2='location=/loc/archive2' scope=both;
alter database add logfile member /loc/online/redo21.log'
to group 1;

Use check logical parameter


Cause RMAN to check for logical corruption
backup check logical database;

Take Away
Test your backup
The lazy way, but Your backup is only as good as your last restore
restore validate database;

Datafile per backup piece


Speed partial restores, as it does not need to read the entire piece
backup database filesperset 1;

Maintain your catalog/controlfile


Control your control file size and retention policy
alter system set control_file_record_keep_time=21
scope=both;
delete obsolete;
crosscheck backup;
delete expired backup;

Backup you controlfiles


It is pretty tough to restore with a controlefile
configure controlfile autobackup on;
backup current controlfile;

Take Away
Test your recovery
Can avoid multiple restore to get it right during an outage
recover database test_db;

Avoid delete all input


delete input will backup from one location and delete what has been backed
up.

Thank You

You might also like