You are on page 1of 51

RMAN 11g New Features R1 and R2

Michael R. Messina, Management Consultant Rolta-TUSC, Oracle Open World 2010 (60 min)
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 17 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 burnt 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 over Typical OS Database Backup


RMAN can detect corrupted blocks and report them to you.

RMAN can backup and restore entire Database, Tablespace(s), Datafile(s), a single block, 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 automatically. RMAN can backup the controlfile and SPFILE automatically

RMAN Limitations versus Typical OS Database Backup


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 must record and

Important RMAN Terminology


Image Copy Full OS type 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

Important RMAN Terminology


DB Incarnation
Incremented each resetlogs

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

Channel A server process on the target or auxiliary database

RMAN New Features 11gR1


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

RMAN New Features 11gR1


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

RMAN New Features 11gR2


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

RMAN New Features 11gR2


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

RMAN New Features 11gR2


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 Off

11gR1

Repair Your Database

Benefits of Data Recovery Advisor


Simplify recoveries Additional detail Gives repair advice Can execute the advised repair Allows the DBA to check the failure

Command-line and OEM interface

Give you Database a check up

Running RMAN Proactive Health Checks


Proactively check database for corrupt blocks Can execute on entire database, a tablespace, a specific datafile or block
RMAN> validate database ; RMAN> validate tablespace users ; RMAN> validate datafile 4 block 1 ;

RMAN Proactive Health Check


RMAN> validate tablespace users ; ..
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

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 Requires a physical standby be in place and current Retrieves to good copy of a corrupted block from the physical standby Rolls block forward using archive logs after block is recovered

Physical Standby

Archived Log Deletion Policy Enhancements


Improves flexibility 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}]...}

Benefits of RMAN 11g New Compression Type (ZLIB)


Faster then original B2ZIP compression Utilizes Less CPU resources ZLIB compression Use
RMAN> configure compression algorithm 'ZLIB' ;

Limits of RMAN 11g New Compression Type (ZLIB)


Compression not as tight therefore Backup Pieces are larger then original BZIP2 Compression. Requires Advanced Compression License

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 readonly 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 DATAFILE FOR TEMPFILE FOR TABLESPACE FOR 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) %NTablespace Name %USystem 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


offers backup to Amazon S3 and other webbased 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 Off


11gR2 the duplicate will attempt to determine where a duplicate left off 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? messinam@tusc.com

Visit the IOUG Booth This Week


Located in the User Group Pavilion - Moscone West, 2nd Floor Learn why over 23,000 have joined IOUG and what it can do for you Chat with the IOUG Board of Directors Hear about new regional IOUG BI user communities Find out how to submit an abstract for COLLABORATE 11 IOUG Forum Enter for a chance to win a COLLABORATE 11 registration Stock up on IOUG gear and educational materials!

51

You might also like