copyright © 2009 rolta international, inc., all rights reserved id#: s309061 rman 11g new features...

49
Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant Rolta-TUSC, Oracle Open World 2009 (60 min)

Upload: riley-kennedy

Post on 26-Mar-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Copyright © 2009 Rolta International, Inc., All Rights Reserved

ID#: S309061 RMAN 11g New Features R1 and R2

Michael R. Messina, Management Consultant

Rolta-TUSC, Oracle Open World 2009 (60 min)

Page 2: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Introduction• Michael Messina• Management Consultant with TUSC• Background includes Performance Tuning,

High Availability and Disaster Recovery• Using Oracle for approximately 16 years• [email protected]• www.tusc.com

Page 3: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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?

Page 4: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Backup, Backup, Backup or you could be toast

Page 5: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 6: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

RMAN Architecture

Page 7: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 8: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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.

Page 9: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 10: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

RMAN Terminology• DB Incarnation

– Incremented each resetlogs

• Tag– A logical name assigned by a user to a backup

set or image copy. Tag=< name >

Page 11: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 12: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 13: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 14: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 15: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 Off

Page 16: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

11gR1

Page 17: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Repair Your Database

Page 18: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 19: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Give you Database a check up

Page 20: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 ;

Page 21: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 411Finished validate at 27-NOV-07

Page 22: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 23: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 24: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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' ;

Page 25: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 upRMAN> 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;

Page 26: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 27: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 28: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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;

Page 29: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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.

Page 30: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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;

Page 31: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 ;

Page 32: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 33: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 34: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 35: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 36: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

11gR2

Page 37: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 38: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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

Page 39: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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)

Page 40: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 ;

}

Page 41: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 ;

}

Page 42: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

RMAN Web-Services Backup• offers 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.

Page 43: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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.

Page 44: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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 ;

Page 45: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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’) ;

Page 46: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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’) ;

}

Page 47: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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.

Page 48: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

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.

Page 49: Copyright © 2009 Rolta International, Inc., All Rights Reserved ID#: S309061 RMAN 11g New Features R1 and R2 Michael R. Messina, Management Consultant

Questions/Discussion

THANK YOU

Any Further Questions? Come see me

Rolta-TUSC Booth # 1021 Moscone South