You are on page 1of 49

ID#: S309061

RMAN 11g New Features R1 and R2

Michael R. Messina, Management


Consultant
Rolta-TUSC, Oracle Open World 2009 (60
Copyright 2009 Rolta International, Inc., All Rights Reserved

Introduction
Michael Messina
Management Consultant with TUSC
Background includes Performance
Tuning, High Availability and
Disaster Recovery
Using Oracle for approximately 16
years
messinam@tusc.com
www.tusc.com

Audience Experience
How many are currently utilizing
RMAN for you Backups?
How many are using a RMAN Catalog
Database?
How Many are using a controlfile only?
How many using RMAN for backups
are using RMAN backup compression
capability?
Thoughts and experiences using
RMAN for your Backups?

Backup, Backup, Backup


or you could be toast

Goals
Brief Overview of RMAN
Introduce New RMAN
Features available in 11gR1
Overview of Features
Show Feature Use
Show Feature Usefulness

Introduce New RMAN


Features available in 11gR2
Overview of Features
Show Feature Use
Show Feature Usefulness

RMAN Architecture

RMAN Benefits
RMAN can detect corrupted blocks and
report them to you.
RMAN can backup and restore
DATABASES, FILES, TABLESPACES,
DATAFILES, CONTROLFILES and SPFILES.
RMAN can create a single Backup of all
archive logs since the last backup
RMAN can delete archive logs after they
are backed up
RMAN can backup the controlfile and
SPFILE automatically

RMAN Limitations
Database instance must be in nomount to
restore controlfile, must also have DBID
Online redo log backups are not supported
No parameter files are backed up (init.ora)
No password files are backed up
A failed RMAN backup job may leave files
behind however the catalog will only reflect
successfully completed jobs.
RMAN works by DBID record and keep track
of them.

RMAN Terminology
Image Copy
Full copy of a single file
Backup Set
Oracle format for a package of
Objects backed up
Backup Piece
Oracle format for a sub package of a
backup set
Channel
A server process on the target
database

RMAN Terminology
DB Incarnation
Incremented each resetlogs

Tag
A logical name assigned by a user to
a backup set or image copy. Tag=<
name >

11g RMAN New Features


R1
Data Recovery Advisor
RMAN Proactive Health Check
Block Recovery Enhancement
Archived Log Deletion Policy
Enhancements
New Compression Type (ZLIB)
Parallel Backup of Same Datafile
Virtual Private Catalog

11g RMAN New Features


R1
Better Recovery Catalog Management
Move a Catalog to another
catalog/database
Merge Database Catalog Data from
another Catalog

Duplicate Database Enhancement


Fast Incremental Backups on Physical
Standby
Optimized UNDO Backup
Read-Only Transported Tablespaces
Backup

11g RMAN New Features


R2

Automatic Block Repair


SET NEWNAME Clause
Enhancements

Substitution Variables
Using SET NEWNAME FOR DATABASE
Using SET NEWNAME FOR TABLESPACE

RMAN Web-Services Backup


Using Image Copies for Faster TSPITR
Performance

11g RMAN New Features


R2
Tablespace Point in Time Recovery
Enhancements (TSPITR)
Ability to TSPITR a dropped
tablespace
SET NEWNAME
DBMS_TTS.TRANSPORT_SET_CHECK
Identifying Relationships that Span
Recovery Set Boundaries

11g RMAN New Features


R2
DUPLICATE DATABASE
Enhancements
New DUPLICATE Options
Duplicate without Connection to
Target Database
Enhancements to DUPLICATE
TABLEPSPACE / DUPLICATE SKIP
TABLESPACE
Duplicate Database Attempts to
Continue Where it Left Of

11gR1

Repair Your Database

Data Recovery Advisor


simplify recoveries
allows the DBA to check the
failure
additional detail
repair advice
execute the advised repair
Command-line and OEM
interface

Give you Database a


check up

RMAN Proactive Health


Check
proactively check database for
corrupt blocks
database, a tablespace or a
specific datafile
RMAN> validate database ;
RMAN> validate tablespace
users ;
RMAN> validate datafile 4
block 1 ;

RMAN Proactive Health


RMAN> validate tablespace users ;
Check
..

channel ORA_DISK_1: specifying datafile(s) for validation


input datafile file number=00004
name=C:\ORACLE\ORADATA\ORCL11G\USERS01.DBF
channel ORA_DISK_1: validation complete, elapsed time:
00:00:15
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined
High SCN
---- ------ -------------- ------------ ----------------------4
OK
0
51199
64000
13457224
File Name: C:\ORACLE\ORADATA\ORCL11G\USERS01.DBF
Block Type Blocks Failing Blocks Processed
---------- -------------- ---------------Data
0
12357
Index
0
33
Other
0
411
Finished validate at 27-NOV-07

Block Recovery
Enhancement
Flashback Logs

Requires flashback database be enabled


Can repair a corrupted block using
blocks from flashback logs
Rolls block forward using archive logs
after block recover

Physical Standby

Requires a physical standby in place and


current
Can retrieve the corrupted block from
the physical standby
Rolls block forward using archive logs
after block recover

Archived Log Deletion


Policyflexibility
Enhancements
Improves
and protection for
Dataguard (standby) environments
Oracle 10g
CONFIGURE ARCHIVELOG DELETION POLICY
{CLEAR | TO {APPLIED ON STANDBY | NONE}}

Oracle 11g
ARCHIVELOG DELETION POLICY {CLEAR | TO
{APPLIED ON [ALL] STANDBY | BACKED UP
integer TIMES TO DEVICE TYPE deviceSpecifier
| NONE | SHIPPED TO [ALL] STANDBY}
[ {APPLIED ON [ALL] STANDBY | BACKED UP
integer TIMES TO DEVICE TYPE deviceSpecifier
| NONE | SHIPPED TO [ALL] STANDBY}]...}

New Compression Type


(ZLIB)
Faster then original B2ZIP
compression
Compression not as tight
Utilizes Less CPU resources
Requires Advanced Compression
License
ZLIB compression Use
RMAN> configure compression
algorithm 'ZLIB' ;

Parallel Backup of Same


Datafile
Allows large datafile to be broken

into sections
Allows indication of section size
Improves speed in which large
datafiles are backed up
RMAN> run {
2> allocate channel c1 type disk format
'/backup1/%U';
3> allocate channel c2 type disk format
'/backup2/%U';
4> backup section size 50m
datafile 4;

Parallel Backup of Same


Datafile
When backed up this way, the

backups show up as sections as


well.

RMAN> list backup of datafile 4;


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

Virtual Private Catalog


Improved Security
Enables multiple virtual
catalogs within the RMAN
catalog
Catalog owner grants access
Separation of databases or
groups of databases within the
RMAN catalog

Virtual Private Catalog


Setting up /using a virtual private catalog
is straight forward
CREATE USER vpc1 IDENTIFIED BY vpc_a
QUOTA UNLIMITED ON users;
GRANT RECOVERY_CATALOG_OWNER TO
vpc_a ;
Grant access on databases to the virtual
private catalog user
$ rman
RMAN> CONNECT CATALOG rman/rman@rman ;
RMAN> GRANT CATALOG FOR DATABASE
db11g
TO vpc_a;

Virtual Private Catalog


Create the virtual catalog with
the new recovery catalog owner
$ rman
RMAN> CONNECT CATALOG
vpc_a/vpc_a@rman ;
RMAN> CREATE VIRTUAL CATALOG;

Connect to the virtual private


catalog using VPC owner
CONNECT CATALOG vpc_a/vpc_a@rman ;
rman target / catalog vpc_a/vpc_a@rman

Use RMAN Normally as you


would a RMAN catalog.

Better Recovery Catalog


Management
Move a Catalog to another
catalog/database

$ sqlplus / as sysdba
SQL> CREATE USER rman2 IDENTIFIED BY
rman2 QUOTA UNLIMITED ON rman_ts;
SQL> GRANT
RECOVERY_CATALOG_OWNER TO rman2;
$ rman catalog=rman2/rman2
RMAN> CREATE CATALOG;
RMAN> IMPORT CATALOG rman@db11g;

Better Recovery Catalog


Management
Merge Database Catalog Data from
another Catalog
RMAN> IMPORT CATALOG
rman@db11g DBID=1423241 ;
RMAN> IMPORT CATALOG
rman@db11g DB_NAME=prod3 ;

Duplicate Database
Enhancements
Active Database Duplication
capability to duplicate a database
without using or having an existing
RMAN backup or manual file copies.
utilizes the network and is also
referred to a Network-Enabled
Database Duplication.
Works for duplicate for standby

Fast Incremental Backup


on Physical Standby
Block change tracking on physical
standby
RMAN can use the change tracking
file on the physical standby
Identifies changed blocks since
last incremental backup
Makes incremental backups on
physical standby faster

Optimized UNDO Backup


Undo Not Needed for Recovery not
backed up
Enabled with CONFIGURE BACKUP
UNDO OPTIMIZATION
Option to preserve undo with in
the UNDO_RETENTION period
Reduces overall backup time and
storage not backing up undo that
applies to committed transactions

Read-Only Transported
Tablespaces Backup

Backup transported tablespaces in


read-only or read-write
Removes restriction that
transported tablespaces must be
made read-write before backup

11gR2

Automatic Block Repair


Allows corrupt blocks on primary
to be automatically repaired
Repaired as soon as detected
Repairs from Blocks from a
physical standby
RECOVER BLOCK enhanced to
restore blocks from physical
standby when available

SET NEWNAME Clause


Enhancements

Simplifies setting new names for files


Handle all files with a single SET
NEWNAME
Order of Precedence
FOR
FOR
FOR
FOR

DATAFILE
TEMPFILE
TABLESPACE
DATABASE

Use with Duplicate, Restore and


Switch

SET NEWNAME Clause


Enhancements
Substitution Variables

The setting of a file format can use a


defined set of substitution variables in the
TO <filename> format specification.
%b
filename without the directory path
%f
absolute file number of the datafile
%I
Database ID (DBID)
%N
Tablespace Name
%U
System Generated file name in the
format (data-D-%d_id-%I_TS_FNO-%f)

SET NEWNAME Clause


Enhancements

SET NEWNAME FOR DATABASE TO


{formatSpec} ;
Example:
RUN
{ SET NEWNAME FOR DATABASE TO
/opt/oracle/oradata/%U ;
SET NEWNAME FOR TEMPFILE TO
/opt/oracle/oradata/%U ;
DUPLICATE TARGET DATABASE TO
newdb ;
}

SET NEWNAME Clause


Enhancements
SET NEWNAME FOR TABLESPACE
<tablespace name> TO {formatspec} ;
Example:
RUN
{

SET NEWNAME FOR DATABASE TO %U ;

SET NEWNAME FOR TEMPFILE TO


/opt/oracle/oradata/%U ;
SET NEWNAME FOR TABLESPACE example TO
/opt/oracle/oradata/%b ;
DUPLICATE TARGET DATABASE TO newdb ;
}

RMAN Web-Services
Backup
ofers backup to Amazon S3 and
other web-based storage services.
provides easy-to-manage, low cost
database backup to remote
storage
service using the internet,
reducing or eliminating the cost
and time to manage an in-house
backup infrastructure.

Tablespace Point in Time


Recovery Enhancements
(TSPITR)
Ability to TSPITR a dropped
tablespace
SET NEWNAME
SET NEWNAME replaces CONFGURE
AUXNAME for recovery set datafiles.

DBMS_TTS.TRANSPORT_SET_CHECK
new procedure for DBMS_TTS package to
determine if tablespaces in the recovery
set are self contained.

Tablespace Point in Time


Recovery Enhancements
(TSPITR)
DBMS_TTS.TRANSPORT_SET_CHECK
(cont)
improved the capability to check
relationships in transport tablespace checks.
Prior to 11gR2 you would check the
tablespace relationships using
SYS.TS_PITR_CHECK.
DBMS_TTS.TRANSPORT_SET_CHECK
(<tblsp1>, <tblsp2>) ;
SELECT * FROM
TRANSPORT_SET_VIOLATIONS ;

Tablespace Point in Time


Recovery Enhancements
(TSPITR)
Using Image Copies for Faster
TSPITR Performance

improved by directing RMAN to use


existing image copies for the recovery.
Prior to 11gR2 you utilized the
CONFIGURE AUXNAME to which allowed
the restore of the datafile to be skipped.
CONFIGURE AUXNAME FOR DATAFILE
<filename> TO <newfilename> ;
RECOVER TABLESPACE <tablespace_name>
UNTIL TIME TO_DATE(03/04/2009 13:00:00,
MM/DD/YYYY HH24:MI:SS) ;

Tablespace Point in Time


Recovery Enhancements
(TSPITR)
Using Image Copies for Faster
TSPITR Performance (cont)

Starting with 11gR2 the SET NEWNAME


FOR DATAFILE command.
RUN
{
SET NEWNAME FOR DATAFILE
<filename> TO <filename> ;
RECOVER TABLESPACE
<tablespace_name> UNTIL TIME
TO_DATE(03/04/2009 13:00:00,
MM/DD/YYYY HH24:MI:SS) ;
}

DUPLICATE DATABASE
Enhancements

Duplicate without Connection to


Target Database
RMAN enhances the duplicate database
so that a connection to the target
database is no longer required.

Duplicate Database Attempts to


Continue Where it Left Of
11gR2 the duplicate will attempt to
determine where a duplicate left of prior
to a failure and continue from that point.

DUPLICATE DATABASE
Enhancements

New Duplicate Database Options


NOREDO Indicates that no archive
logs will be applied
UNDO_TABLESPACE = when not
connected to a recovery catalog and
not connected to a target database
RMAN can not obtain the list of
tablespaces with undo segments
therefore this must be used to specify
the UNDO tablespace.

Questions/Discussion

THANK YOU

Any Further Questions?


Come see me
Rolta-TUSC Booth # 1021 Moscone South

You might also like