Tải bản đầy đủ (.pdf) (50 trang)

Tài liệu Oracle RMAN 11g Backup and Recovery- P1 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.07 MB, 50 trang )

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
®
Oracle RMAN 11g
Backup and Recovery
Robert G. Freeman
Matthew Hart
New York Chicago San Francisco
Lisbon London Madrid Mexico City Milan
New Delhi San Juan Seoul Singapore Sydney Toronto
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Copyright © 2010 by The McGraw-Hill Companies, Inc. (Publisher). All rights reserved. Except as permitted under the United States Copyright
Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system,
without the prior written permission of the publisher.
ISBN: 978-0-07-162861-7
MHID: 0-07-162861-4
The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-162860-0, MHID: 0-07-162860-6.
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we
use names in an editorial fashion only, and to the benefi t of the trademark owner, with no intention of infringement of the trademark. Where such
designations appear in this book, they have been printed with initial caps.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training
programs. To contact a representative please e-mail us at
Information has been obtained by Publisher from sources believed to be reliable. However, because of the possibility of human or mechanical error
by our sources, Publisher, or others, Publisher does not guarantee to the accuracy, adequacy, or completeness of any information included in this
work and is not responsible for any errors or omissions or the results obtained from the use of such information.
Oracle Corporation does not make any representations or warranties as to the accuracy, adequacy, or completeness of any information contained in
this work, and is not responsible for any errors or omissions.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGrawHill”) and its licensors reserve all rights in and to the work. Use of
this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work,
you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate,
sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and


personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE
ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY
INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM
ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the
work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to
you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has
no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be
liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if
any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether
such claim or cause arises in contract, tort or otherwise.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
t 6QUPEBUF JOGPSNBUJPO PO 0SBDMF %BUBCBTF 0SBDMF "QQMJDBUJPO 4FSWFS
8FC EFWFMPQNFOU FOUFSQSJTF HSJE DPNQVUJOH EBUBCBTF UFDIOPMPHZ
BOE CVTJOFTT USFOET
t 5IJSEQBSUZ OFXT BOE BOOPVODFNFOUT
t 5FDIOJDBM BSUJDMFT PO 0SBDMF BOE QBSUOFS QSPEVDUT UFDIOPMPHJFT
BOE PQFSBUJOH FOWJSPONFOUT
t %FWFMPQNFOU BOE BENJOJTUSBUJPO UJQT
t 3FBMXPSME DVTUPNFS TUPSJFT
If there are other Oracle users at
your location who would like to
receive their own subscription to
Oracle Magazine, please photo-
copy this form and pass it along.
Three easy ways to subscribe:
Web

7JTJU PVS 8FC TJUF BU oracle.com/oraclemagazine
:PVMM GJOE B TVCTDSJQUJPO GPSN UIFSF QMVT NVDI NPSF
Fax
$PNQMFUF UIF RVFTUJPOOBJSF PO UIF CBDL PG UIJT DBSE
BOE GBY UIF RVFTUJPOOBJSF TJEF POMZ UP +1.847.763.9638
Mail
$PNQMFUF UIF RVFTUJPOOBJSF PO UIF CBDL PG UIJT DBSE
BOE NBJM JU UP P.O. Box 1263, Skokie, IL 60076-8263
1
2
3
FREE SUBSCRIPTION
GET
YOUR
TO ORACLE MAGAZINE
Oracle Magazine is essential gear for today’s information technology professionals.
Stay informed and increase your productivity with every issue of Oracle Magazine.
Inside each free bimonthly issue you’ll get:
Copyright © 2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
WHAT IS THE PRIMARY BUSINESS ACTIVITY
OF YOUR FIRM AT THIS LOCATION? (check
one only)
o 01 Aerospace and Defense Manufacturing
o 02 Application Service Provider
o 03 Automotive Manufacturing
o 04 Chemicals
o 05 Media and Entertainment
o 06 Construction/Engineering
o 07 Consumer Sector/Consumer Packaged

Goods
o 08 Education
o 09 Financial Services/Insurance
o 10 Health Care
o 11 High Technology Manufacturing, OEM
o 12 Industrial Manufacturing
o 13 Independent Software Vendor
o 14 Life Sciences (biotech, pharmaceuticals)
o 15 Natural Resources
o 16 Oil and Gas
o 17 Professional Services
o 18 Public Sector (government)
o 19 Research
o 20 Retail/Wholesale/Distribution
o 21 Systems Integrator, VAR/VAD
o 22 Telecommunications
o 23 Travel and Transportation
o 24 Utilities (electric, gas, sanitation, water)
o 98 Other Busi ne ss a nd S er vi ce s _________
WHICH OF THE FOLLOWING BEST DESCRIBES
YOUR PRIMARY JOB FUNCTION?
(check one only)
CORPORATE MANAGEMENT/STAFF
o 01 Executive Management (President, Chair,
CEO, CFO, Owner, Partner, Principal)
o 02 Finance/Administrative Management
(VP/Director/ Manager/Controller,
Purchasing, Administration)
o 03 Sales/Marketing Management
(VP/Director/Manager)

o 04 Computer Systems/Operations
Management
(CIO/VP/Director/Manager MIS/IS/IT, Ops)
IS/IT STAFF
o 05 Application Development/Programming
Management
o 06 Application Development/Programming
Staff
o 07 Consulting
o 08 DBA/Systems Administrator
o 09 Education/Training
o 10 Technical Support Director/Manager
o 11 Other Technical Management/Staff
o 98 Other
WHAT IS YOUR CURRENT PRIMARY OPERATING
PLATFORM (check all that apply)
o 01 Digital Equipment Corp UNIX/VAX/VMS
o 02 HP UNIX
o 03 IBM AIX
o 04 IBM UNIX
o 05 Linux (Red Hat)
o 06 Linux (SUSE)
o 07 Linux (Oracle Enterprise)
o 08 Linux (other)
o 09 Macintosh
o 10 MVS
o 11 Netware
o 12 Network Computing
o 13 SCO UNIX
o 14 Sun Solaris/SunOS

o 15 Windows
o 16 Other UNIX
o 98 Other
99
o None of the Above
DO YOU EVALUATE, SPECIFY, RECOMMEND,
OR AUTHORIZE THE PURCHASE OF ANY OF
THE FOLLOWING? (check all that apply)
o 01 Hardware
o 02 Business Applications (ERP, CRM, etc.)
o
03 Application Development Tools
o 04 Database Products
o 05 Internet or Intranet Products
o 06 Other Software
o 07 Middleware Products
99
o None of the Above
IN YOUR JOB, DO YOU USE OR PLAN TO PUR-
CHASE ANY OF THE FOLLOWING PRODUCTS?
(check all that apply)
SOFTWARE
o 01 CAD/CAE/CAM
o 02 Collaboration Software
o 03 Communications
o 04 Database Management
o 05 File Management
o 06 Finance
o 07 Java
o 08 Multimedia Authoring

o 09 Networking
o 10 Programming
o 11 Project Management
o 12 Scientific and Engineering
o 13 Systems Management
o 14 Workflow
HARDWARE
o 15 Macintosh
o 16 Mainframe
o 17 Massively Parallel Processing
o 18 Minicomputer
o 19 Intel x86(32)
o 20 Intel x86(64)
o 21 Network Computer
o 22 Symmetric Multiprocessing
o 23 Workstation Services
SERVICES
o 24 Consulting
o 25 Education/Training
o 26 Maintenance
o 27 Online Database
o 28 Support
o 29 Technology-Based Training
o 30 Other
99
o None of the Above
WHAT IS YOUR COMPANY’S SIZE?
(check one only)
o 01 More than 25,000 Employees
o 02 10,001 to 25,000 Employees

o 03 5,001 to 10,000 Employees
o 04 1,001 to 5,000 Employees
o 05 101 to 1,000 Employees
o 06 Fewer than 100 Employees
DURING THE NEXT 12 MONTHS, HOW MUCH
DO YOU ANTICIPATE YOUR ORGANIZATION
WILL SPEND ON COMPUTER HARDWARE,
SOFTWARE, PERIPHERALS, AND SERVICES FOR
YOUR LOCATION? (check one only)
o 01 Less than $10,000
o 02 $10,000 to $49,999
o 03 $50,000 to $99,999
o 04 $100,000 to $499,999
o 05 $500,000 to $999,999
o 06 $1,000,000 and Over
WHAT IS YOUR COMPANY’S YEARLY SALES
REVENUE? (check one only)
o 01 $500, 000, 000 and above
o 02 $100, 000, 000 to $500, 000, 000
o 03 $50, 000, 000 to $100, 000, 000
o 04 $5, 000, 000 to $50, 000, 000
o 05 $1, 000, 000 to $5, 000, 000
WHAT LANGUAGES AND FRAMEWORKS DO
YOU USE? (check all that apply)
o 01 Ajax o 13 Python
o 02 C o 14 Ruby/Rails
o 03 C++ o 15 Spring
o 04 C# o 16 Struts
o 05 Hibernate o 17 SQL
o 06 J++/J# o 18 Visual Basic

o 07 Java o 98 Other
o 08 JSP
o 09 .NET
o 10 Perl
o 11 PHP
o 12 PL/SQL
WHAT ORACLE PRODUCTS ARE IN USE AT YOUR
SITE? (check all that apply)
ORACLE DATABASE
o 01 Oracle Database 11
g
o 02 Oracle Database 10
g
o 03 Oracle9
i
Database
o 04 Oracle Embedded Database
(Oracle Lite, Times Ten, Berkeley DB)
o 05 Other Oracle Database Release
ORACLE FUSION MIDDLEWARE
o 06 Oracle Application Server
o 07 Oracle Portal
o 08 Oracle Enterprise Manager
o 09 Oracle BPEL Process Manager
o 10 Oracle Identity Management
o 11 Oracle SOA Suite
o 12 Oracle Data Hubs
ORACLE DEVELOPMENT TOOLS
o 13 Oracle JDeveloper
o 14 Oracle Forms

o 15 Oracle Reports
o 16 Oracle Designer
o 17 Oracle Discoverer
o 18 Oracle BI Beans
o 19 Oracle Warehouse Builder
o 20 Oracle WebCenter
o 21 Oracle Application Express
ORACLE APPLICATIONS
o 22 Oracle E-Business Suite
o 23 PeopleSoft Enterprise
o 24 JD Edwards EnterpriseOne
o 25 JD Edwards World
o 26 Oracle Fusion
o 27 Hyperion
o 28 Siebel CRM
ORACLE SERVICES
o 28 Oracle E-Business Suite On Demand
o 29 Oracle Technology On Demand
o 30 Siebel CRM On Demand
o 31 Oracle Consulting
o 32 Oracle Education
o 33 Oracle Support
o 98 Other
99
o None of the Above
YOU MUST ANSWER ALL 10 QUESTIONS BELOW.
1
2
3
4

5
6
7
8
9
08014004
signature (required) date
x
From time to time, Oracle Publishing allows our partners
exclusive access to our e-mail addresses for special promo-
tions and announcements. To be included in this program,
please check this circle. If you do not wish to be included, you
will only receive notices about your subscription via e-mail.
Oracle Publishing allows sharing of our postal mailing list with
selected third parties. If you prefer your mailing address not to
be included in this program, please check this circle.
If at any time you would like to be removed from either mailing list, please contact
Customer Service at +1.847.763.9635 or send an e-mail to
If you opt in to the sharing of information, Oracle may also provide you with
e-mail related to Oracle products, services, and events. If you want to completely
unsubscribe from any e-mail communication from Oracle, please send an e-mail to:
with the following in the subject line: REMOVE [your
e-mail address]. For complete information on Oracle Publishing’s privacy practices,
please visit oracle.com/html/privacy/html
name title
company e-mail address
street/p.o. box
city/state/zip or postal code telephone
country fax
Want your own FREE subscription?

Yes, please send me a FREE subscription Oracle Magazine. No.
Would you like to receive your free subscription in digital format instead of print if it becomes available? Yes No
To receive a free subscription to Oracle Magazine, you must fill out the entire card, sign it, and date
it (incomplete cards cannot be processed or acknowledged). You can also fax your application to
+1.847.763.9638. Or subscribe at our Web site at oracle.com/oraclemagazine
10
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
This book is dedicated to all the people who make my life great. My kids,
my wife, my cat, my father, my friends, co-workers past and present.
—Robert
This book is dedicated to the team of professionals around the globe that
I have the privilege of working with every day.
—Matthew
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
About the Authors
Robert G. Freeman has been an Oracle DBA for so long he can’t remember now when he
actually entered SQL*Plus for the first time. In his spare time (what’s that?) Robert flies airplanes
and loves to ride trains. Robert has written a number of books, including previous titles for Oracle
Press on Oracle Database 11g New Features.
Matthew Hart is the coauthor of six books for Oracle Press, most recently Oracle 10g High
Availability with RAC, Flashback, and DataGuard, Oracle Enterprise Manager 10g Handbook,
and the tome you now hold in your hands. He has worked with high availability technologies
in Oracle since version 7.3, and has worked with RMAN since its inception. Matthew currently
works and lives in Kansas City, Missouri.
About the Contributors
Emre Baransel received his B.S. degree from Istanbul University in Electric and Electronic
Engineering. He started his career in information technology and became an Oracle addict. He
worked for Turkey’s leading Telco and GSM operators as an Oracle DBA. His special focus is on
grid technologies, disaster recovery, and security. He writes articles on his Oracle blog and also
supervises a web page that publishes Oracle-related writings in Turkish. He’s an OCP (Oracle

Certified Professional) and CCNP (Cisco Certified Network Professional).
Scott Black has worked in information technology for over ten years, mostly in the e-commerce,
and healthcare industries. His main areas of focus were networking and server administration
when he started his career, and he has spent the last six years in database administration focusing
on Oracle and SQL Server. With Oracle, his main interests are large-scale database performance
tuning, RAC, and enterprise management of large numbers of databases.
Alan Bort started working as first-line support for Oracle customers before the support model
switched to web-based Oracle support. In the beginning, his area of interest was Linux System
Administration, Oracle Database, and Oracle Applications, but later focused only on Oracle
Database with a special interest in large-scale high availability and disaster recovery scenarios.
He currently works for IBM’s Service Delivery structure for several companies and has worked
on several projects to overhaul their Disaster Recovery capabilities.
Jeremiah Wilton has over fifteen years of Oracle administration and architecture experience.
As Amazon.com’s first DBA, he helped lead Amazon.com’s database group from pre-IPO times
through the years of exponential growth. He now directs education and emergency support
services for Blue Gecko, a leader in remote database administration and managed hosting for
Oracle, Oracle Applications, and MySQL. Jeremiah is a recognized expert in scalability, high
availability, stability, and complex recoveries. He also teaches the Oracle Certificate Program at
the University of Washington and independent seminars on a variety of Oracle subjects. In 2001
at Oracle Openworld, Oracle Education honored Jeremiah as one of the first eight Oracle Certified
Masters in the world. Jeremiah is a member of the Oak Table and has presented at numerous
conferences including Oracle Openworld, Collaborate, and UKOUG. He is the author of a
variety of technical whitepapers and articles available at www.bluegecko.net.
Alisher Yuldashev has been an Oracle DBA for more than twelve years. Currently, he is a Senior
Oracle DBA at The Pythian Group, a global industry leader in remote database administration
services and consulting for Oracle and Oracle Applications. Alisher is an Oracle Certified
Professional DBA and is responsible for all aspects of database administration for Pythian’s wide
range of multinational clients, from migrations and performance tuning to disaster recovery, and
data warehousing. Alisher lives in Ottawa, Canada, with his wife, Anna, and their child, Rihanna.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

When he is not working with Oracle, he spends his time with his wonderful family, and enjoys
snowboarding the Canadian mountains and reading books.
About the Technical Editor
Matt Arrocha started in the computer industry as a hardware technician. He spent 5 years at
NASA in Florida repairing hardware for all manned and unmanned space flight. He worked for
2 years with Seagate in their tape backup division (previously Conner/Maynard). He has been
with Oracle now since 1996 and has been working with Recovery Manager since its release in
Oracle Database 8.0.3. He is currently the Advanced Resolution Lead for Backup & Recovery
in the United States and Canada and the RMAN Global Technical Lead.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
This page intentionally left blank
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents at a Glance
PART I
Getting Started with RMAN in Oracle Database 11g
1 Oracle Database 11g Backup and Recovery Architecture Tour . . . . . . . . . . . . . . 3
2 Introduction to the RMAN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
PART II
Setup Principles and Practices
3 RMAN Setup and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4 Media Management Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5 Oracle Secure Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6 Backing Up to Amazon Web Services Using the Oracle Secure
Backup Cloud Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
7 Enhancing RMAN with VERITAS NetBackup
TM
for Oracle . . . . . . . . . . . . . . . . . . 153
8 Configuring HP Data Protector for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9 RMAN and Tivoli Storage Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
10 Using the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

11 RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
12 RMAN Restore and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
PART III
Using RMAN Effectively
13 Using Oracle Enterprise Manager for Backup and Recovery . . . . . . . . . . . . . . . . 307
14 RMAN Advanced Recovery Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
15 Surviving User Errors: Flashback Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
16 Maintaining RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
vii
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
viii Oracle RMAN 11g Backup and Recovery
17 Monitoring and Reporting on RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
18 Performance Tuning RMAN Backup and Recovery Operations . . . . . . . . . . . . . . 445
PART IV
RMAN in the Oracle Ecosystem
19 Duplication: Cloning the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
20 RMAN and Data Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
21 RMAN and Real Application Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
22 RMAN in Sync and Split Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
23 RMAN in the Workplace: Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
PART V
Appendixes
A RMAN Syntax Reference Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
B RMAN Scripting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
C Setting Up an RMAN Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

PART I
Getting Started with RMAN in Oracle Database 11g
1 Oracle Database 11g Backup and Recovery Architecture Tour . . . . . . . . . . . . . . . . . . 3
Backup and Recovery Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
A Few Oracle Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Controlling the Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Oracle Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The Oracle Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Oracle Memory and RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
More About the Oracle Redo Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ARCHIVELOG Mode vs. NOARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . . 20
Oracle Logical Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
The Combined Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Startup and Shutdown of the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Using the Database and Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Oracle Backup and Recovery Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Logical Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Oracle Physical Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Backing Up Other Oracle Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2 Introduction to the RMAN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Server-Managed Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The RMAN Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
RMAN and Database Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Network Topology of RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Running RMAN Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Running RMAN Locally from the Target Database’s ORACLE_HOME . . . . . . . . 37

The Database Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Record Reuse in the Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ix
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
x Oracle RMAN 11g Backup and Recovery
The Snapshot Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The RMAN Server Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
RMAN Channel Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The SYS Packages Used by RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
SYS.DBMS_RCVMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
SYS.DBMS_BACKUP_RESTORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Backing Up the Data Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The Data Block Backup Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The Benefits of Block-Level Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
RMAN in Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Input Memory Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
RMAN Memory Utilization: PGA vs. SGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
The Auxiliary Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Compatibility Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The Target and the RMAN Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The Catalog Database and Catalog Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The Auxiliary Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
The RMAN Process: From Start to Finish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
The Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
PART II
Setup Principles and Practices
3 RMAN Setup and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Configuring Your Database to Run in ARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . 62

ARCHIVELOG Destination Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
The Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Should You Use the FRA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Switching Between ARCHIVELOG Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
If You Created Your Database with the Oracle Database
Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
RMAN Workshop: Put the Database in ARCHIVELOG Mode . . . . . . . . . . . . . . 72
The Oracle Database 11g Fault Diagnosability Infrastructure . . . . . . . . . . . . . . . . . . . . 73
The RMAN Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Connecting via the RMAN Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
RMAN Client Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using the RMAN connect Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Exiting the RMAN Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Configuring the Database for RMAN Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Setting Up the Database User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
RMAN Workshop: Create the Target Database RMAN Backup Account . . . . . . 80
Setting Up Database Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Setting the CONTROL_FILE_RECORD_KEEP_TIME Parameter . . . . . . . . . . . . . 82
Configuring RMAN Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Introducing the configure Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Configuring Various RMAN Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Examples of Using the configure Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
If You Are Using Shared Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents xi
Summary of RMAN Configuration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Other Backup and Recovery Setup and Configuration Considerations . . . . . . . . . . . . . 99
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4 Media Management Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Tape Backups in a Disk Backup World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

RMAN and the Media Manager: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
The Media Manager Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
The Media Manager: Other Software Components . . . . . . . . . . . . . . . . . . . . . . 104
Media Management Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
RMAN Workshop: Test Tape Channels with the Oracle Default
SBT Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Interfacing with the MML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The SBT API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Back Up to Tape: From Start to Finish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Restore from Tape: From Start to Finish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Using sbttest and loadsbt.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Media Management Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5 Oracle Secure Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Features of Oracle Secure Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Oracle Secure Backup and Recovery Manager . . . . . . . . . . . . . . . . . . . . . . . . . 115
Differences Between OSB and OSB Express . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Backup Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Fast Database Backup Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Oracle Secure Backup Cloud Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Oracle Secure Backup Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Oracle Secure Backup Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Oracle Secure Backup Daemons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Host Access Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Administrative Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Oracle Secure Backup Users and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Operating System Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
NDMP Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Oracle Secure Backup Rights and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Installing and Configuring Oracle Secure Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

RMAN Workshop: Install and Configure Oracle Secure Backup . . . . . . . . . . . . 123
Oracle Database and File System Data Backup Using Oracle Secure Backup . . . . . . . . 133
RMAN Workshop: Schedule Oracle Database and File System
Data Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Oracle Database Backup Using Oracle Secure Backup Cloud Module . . . . . . . . . . . . . 138
RMAN Workshop: Installing OSB Cloud Module and Using It
for OSB Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6 Backing Up to Amazon Web Services Using the Oracle Secure
Backup Cloud Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Conventional Backups: Assumptions and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . 144
The Oracle Secure Backup Cloud Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
What Is Cloud Computing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
xii Oracle RMAN 11g Backup and Recovery
Oracle and the Amazon Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Elastic Compute Cloud (EC2) and Elastic Block Store (EBS) . . . . . . . . . . . . . . . . 145
Simple Storage Service (S3)—Oracle’s Cloud Backup Solution . . . . . . . . . . . . . 145
RMAN Backup to S3: The Oracle Secure Backup Cloud Module . . . . . . . . . . . 145
S3 Backup over the Internet or from Amazon EC2 . . . . . . . . . . . . . . . . . . . . . . 145
Oracle Cloud Backup Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
RMAN Workshop: Deploying RMAN Backups to Amazon S3 . . . . . . . . . . . . . . 146
Performing Backups by Using the OSB Cloud Module . . . . . . . . . . . . . . . . . . . . . . . . . 148
Listing RMAN Backups and Backup Sets Stored on S3 . . . . . . . . . . . . . . . . . . . 150
Optimizing Backups and Recoveries over the Internet Using
the OSB Cloud Module and Amazon S3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Licensing Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
7 Enhancing RMAN with VERITAS NetBackup
TM

for Oracle . . . . . . . . . . . . . . . . . . . . . . 153
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Necessary Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Storage/Media Device Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
NetBackup Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Pre-Installation Tasks for NetBackup for Oracle Agent . . . . . . . . . . . . . . . . . . . 156
NetBackup for Oracle Agent Installation Steps . . . . . . . . . . . . . . . . . . . . . . . . . 157
How to Link Oracle to NetBackup Media Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Automatic Link Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Manual Link Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Configuring NetBackup Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Adding New Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Defining Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Defining a Backup Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Defining Policy Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Managing Expired Backup Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Delete Expired Backups Using NetBackup Repository . . . . . . . . . . . . . . . . . . . 167
Delete Expired Backups Using RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
RMAN Sample Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Use NetBackup Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Determine Which Library Is in Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Security Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Cost Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
8 Configuring HP Data Protector for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Integration of Oracle and Data Protector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Support Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Integration Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

RMAN Workshop: Integration Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 176
RMAN Backup Configuration on Data Protector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
RMAN Workshop: Backup Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Editing the Oracle RMAN Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
RMAN Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Backup Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents xiii
Backup Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Restoring Oracle Using the Data Protector GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Restoring the Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Restoring Oracle Database Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Oracle RMAN Metadata and Data Protector Media Management
Database Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
9 RMAN and Tivoli Storage Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Overview of Tivoli Storage Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
TSM Server System Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
TSM Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
TSM Administration Center and Web Client . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
RMAN Workshop: Configuring TDPO for Oracle . . . . . . . . . . . . . . . . . . . . . . . 194
Performing an RMAN Backup Using TDPO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Deleting Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Troubleshooting Common Backup Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Additional Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
10 Using the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
What Is the Recovery Catalog? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Creating the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
RMAN Workshop: Create the Recovery Catalog User Account . . . . . . . . . . . . . 210

RMAN Workshop: Create the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . 211
RMAN Workshop: Register Your Database in the Recovery Catalog . . . . . . . . . 211
Utilizing a Virtual Private Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
RMAN Workshop: Create a Virtual Private Catalog . . . . . . . . . . . . . . . . . . . . . . 213
Merging Multiple Recovery Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
RMAN Workshop: Merge Two Recovery Catalogs . . . . . . . . . . . . . . . . . . . . . . 214
Recovery Catalog Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Unregistering a Database in RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Database Migration/Upgrade Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Manually Resetting the Database Incarnation (reset catalog) . . . . . . . . . . . . . . . 215
Manually Resynchronizing the Recovery Catalog (resync catalog) . . . . . . . . . . 216
Purging Recovery Catalog Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Backing Up the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Recovery Catalog Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
RC_ARCHIVED_LOG (V$ARCHIVED_LOG) . . . . . . . . . . . . . . . . . . . . . . . . . . 217
RC_BACKUP_CONTROLFILE (V$BACKUP_DATAFILE) . . . . . . . . . . . . . . . . . . 218
RC_BACKUP_CORRUPTION (V$BACKUP_CORRUPTION) . . . . . . . . . . . . . . 218
RC_BACKUP_DATAFILE (V$BACKUP_DATAFILE) . . . . . . . . . . . . . . . . . . . . . . 218
RC_BACKUP_FILES (V$BACKUP_FILES) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
RC_BACKUP_PIECE (V$BACKUP_PIECE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
RC_BACKUP_REDOLOG (V$BACKUP_REDOLOG) . . . . . . . . . . . . . . . . . . . . 219
RC_BACKUP_SET (V$BACKUP_SET) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
RC_BACKUP_SPFILE (V$BACKUP_SPFILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
RC_CONTROLFILE_COPY (V$DATAFILE_COPY) . . . . . . . . . . . . . . . . . . . . . . . 219
RC_COPY_CORRUPTION (V$COPY_CORRUPTION) . . . . . . . . . . . . . . . . . . . 219
RC_DATABASE (V$DATABASE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
xiv Oracle RMAN 11g Backup and Recovery
RC_DATABASE_BLOCK_CORRUPTION
(V$DATABASE_BLOCK_CORRUPTION) . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

DATABASE_INCARNATION (V$DATABASE_INCARNATION) . . . . . . . . . . . . . 220
RC_DATAFILE (V$DATAFILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
RC_DATAFILE_COPY (V$DATAFILE_COPY) . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
RC_LOG_HISTORY (V$LOG_HISTORY) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
RC_OFFLINE_RANGE (V$OFFLINE_RANGE) . . . . . . . . . . . . . . . . . . . . . . . . . . 221
RC_REDO_LOG (V$LOG, V$LOGFILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
RC_REDO_THREAD (V$THREAD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
RC_RESYNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
RC_RMAN_CONFIGURATION (V$RMAN_CONFIGURATION) . . . . . . . . . . . . 221
RC_TABLESPACE (V$TABLESPACE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
RC_TEMPFILE (V$TEMPFILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Catalog Views Intended for Use by Oracle Enterprise Manager . . . . . . . . . . . . . 222
11 RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Benefits of RMAN Backups vs. Scripted Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
RMAN Compatibility Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Monitoring RMAN Backup Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Offline RMAN Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Offline Backups Using Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
RMAN Workshop: Do an Offline Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Offline Backups Without Using Configured Defaults . . . . . . . . . . . . . . . . . . . . 232
Backup Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Multisection Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Tags and Restore Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Limiting Backup Impacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Limiting the Size of a Backup Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Backing Up to a Specific Device Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Modifying the Retention Policy for a Backup Set . . . . . . . . . . . . . . . . . . . . . . . 240
Archive Log Deletion Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Overriding the configure exclude Command . . . . . . . . . . . . . . . . . . . . . . . . . . 243

Checking the Database for Errors with the backup Command . . . . . . . . . . . . . . 243
Skipping Offline, Inaccessible, or Read-Only Datafiles . . . . . . . . . . . . . . . . . . . 243
Forcing a Backup of Read-Only Datafiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Backing Up Datafiles Based on Their Last Backup Time . . . . . . . . . . . . . . . . . . 244
Making Copies of Backups on Your RMAN Copier . . . . . . . . . . . . . . . . . . . . . . 245
Capturing the Elusive Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Introducing the set Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Online RMAN Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Online Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
RMAN Workshop: Do an Online Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Tablespace Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Datafile Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Archived Redo Log Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Control File and Parameter File Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Backup Set Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Flash Recovery Area Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Introducing Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents xv
Database, Tablespace, and Datafile Image Copies . . . . . . . . . . . . . . . . . . . . . . 253
Control File Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
ARCHIVELOG Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Incremental RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
The Block Change Tracking File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
The Base Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Differential vs. Cumulative Incremental Backups . . . . . . . . . . . . . . . . . . . . . . . 257
RMAN Workshop: Do an Incremental Backup . . . . . . . . . . . . . . . . . . . . . . . . . 260
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
RMAN Workshop: Get Your Database Backed Up! . . . . . . . . . . . . . . . . . . . . . . 261

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
12 RMAN Restore and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
RMAN Restore and Recovery Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Before You Can Restore the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Before RMAN Can Get Going . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
A Note about Recoveries, the Recovery Catalog, and the MML Layer . . . . . . . . 268
Restoring the SPFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Restoring the Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Recovering the Control File from an Autobackup Using RMAN
and the FRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
RMAN Workshop: Recover Your Control File . . . . . . . . . . . . . . . . . . . . . . . . . . 279
The restore and recover Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
The restore Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
The recover Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Restore and Recover the Database in NOARCHIVELOG Mode . . . . . . . . . . . . . . . . . . 281
Preparing for the Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Restoring to a Different Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
RMAN Workshop: Recover Your NOARCHIVELOG Mode Database . . . . . . . . 286
Database Recoveries in ARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Point-of-Failure Database Recoveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
RMAN Workshop: Complete Recovery of Your ARCHIVELOG
Mode Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Tablespace Recoveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Datafile Recoveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
What If I Use Incremental Backups? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Recovering from Online Redo Log Loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Loss of an Inactive Online Redo Log Group Member . . . . . . . . . . . . . . . . . . . . 294
Loss of an Inactive Online Redo Log Group . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Loss of an Active but Not Current Online Redo Log Group . . . . . . . . . . . . . . . . 296
Loss of the Current Online Redo Log Group . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

The Data Recovery Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Using the Data Recovery Advisor Through RMAN . . . . . . . . . . . . . . . . . . . . . . 297
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
PART III
Using RMAN Effectively
13 Using Oracle Enterprise Manager for Backup and Recovery . . . . . . . . . . . . . . . . . . . . 307
Oracle Enterprise Manager: The New Paradigm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Grid Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
xvi Oracle RMAN 11g Backup and Recovery
The Grid Control Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Installing and Configuring Grid Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Database Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
The Database Control Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Installing and Configuring Database Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Using Enterprise Manager Configuration Assistant to Configure
Database Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
RMAN Workshop: Configure Database Control Using emca . . . . . . . . . . . . . . . 316
Configuring Backup Settings in Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Device Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Backup Set Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Policy Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
What Is Missing from OEM’s Backup Configuration? . . . . . . . . . . . . . . . . . . . . 321
RMAN Workshop: Configure Backup Settings in OEM . . . . . . . . . . . . . . . . . . . 321
Configuring Recovery Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Instance Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Media Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Flash Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
RMAN Workshop: Configure Recovery Settings in OEM . . . . . . . . . . . . . . . . . . 325
Configuring Recovery Catalogs in OEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

RMAN Workshop: Register the Recovery Catalog with OEM . . . . . . . . . . . . . . 326
Related Links for Recovery Catalog Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Database Backups from Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Oracle-Suggested Backup Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Scheduling a Customized Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
RMAN Script Job vs. Scheduled Backup Wizard . . . . . . . . . . . . . . . . . . . . . . . . 331
RMAN Workshop: Create an RMAN Script Job in OEM . . . . . . . . . . . . . . . . . . 332
Performing Recovery in Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Data Recovery Advisor and the OEM Checkers . . . . . . . . . . . . . . . . . . . . . . . . 335
User Directed Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
RMAN Workshop: Perform Database Recovery from OEM . . . . . . . . . . . . . . . . 340
Backup Management and Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Managing Current Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Managing Restore Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Creating Backup Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Database Cloning from Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
14 RMAN Advanced Recovery Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Incomplete Recoveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Using the resetlogs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Establishing a Point to Recover To . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Time-Based Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
SCN-Based Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Log Sequence–Based Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Cancel-Based Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Recovery Using Restore Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Other RMAN Recovery Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Read-Only Tablespace Recovery Considerations . . . . . . . . . . . . . . . . . . . . . . . 350
Archived Redo Log Restores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Datafile Copy Restores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents xvii
Recovering Corrupted Data Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Recovering to a Previous Incarnation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Tablespace Point-In-Time Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Performing Automated TSPITR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Manual TSPITR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
TSPITR Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Verifying Your Backups Are Recoverable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
The restore preview Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Restoring with the validate and check logical Commands . . . . . . . . . . . . . . . . 369
Using the validate backupset Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Call the Movers! Cross-Platform Database Movement and RMAN . . . . . . . . . . . . . . . . 371
Introduction to Cross-Platform Transportable Tablespaces . . . . . . . . . . . . . . . . . 372
Byte Ordering and Datafile Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
We Like to Move It! Move It! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Sometimes Things Just Go Wrong . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
15 Surviving User Errors: Flashback Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Prepared for the Inevitable: Flashback Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Flashback and the Undo Segment: A Love Story . . . . . . . . . . . . . . . . . . . . . . . . 379
Performing Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Flashback Versions Query with Oracle Enterprise Manager . . . . . . . . . . . . . . . 380
RMAN Workshop: Explore Flashback Versions Query . . . . . . . . . . . . . . . . . . . 381
Flashback Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Performing the Flashback Table Operation from SQL . . . . . . . . . . . . . . . . . . . . 384
Flashback Table with Oracle Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . 385
RMAN Workshop: Explore Flashback Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Flashback Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

RMAN Workshop: Utilize Flashback Transaction from Enterprise Manager . . . . 388
Flashback Drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
The Recycle Bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
RMAN Workshop: Explore Flashback Drop and the Recycle Bin . . . . . . . . . . . 391
Flashback Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Flashback Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Flashback Retention Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
RMAN Workshop: Configure for Flashback Database . . . . . . . . . . . . . . . . . . . . 394
Flashback Database: Tuning and Tweaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
RMAN Workshop: Perform Flashback Database . . . . . . . . . . . . . . . . . . . . . . . . 396
Flashback Data Archive (Total Recall) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
RMAN Workshop: Create a Flashback Data Archive . . . . . . . . . . . . . . . . . . . . . 398
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
16 Maintaining RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
RMAN Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Cross-Checking RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
RMAN Workshop: Using the crosscheck Command . . . . . . . . . . . . . . . . . . . . . 402
Validation of RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Backup Retention Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
The change Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
RMAN Workshop: Using the change Command . . . . . . . . . . . . . . . . . . . . . . . . 414
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
xviii Oracle RMAN 11g Backup and Recovery
The delete Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
RMAN Workshop: Using the delete Command . . . . . . . . . . . . . . . . . . . . . . . . . 417
Cataloging Other Backups in RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
RMAN Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Creating Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Querying the Recovery Catalog for Stored Script Information . . . . . . . . . . . . . . 419
Changing Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

Deleting Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Using Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Printing Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
RMAN Workshop: Using RMAN Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . 420
When You Just Can’t Take It Anymore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
17 Monitoring and Reporting on RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
The RMAN list Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Listing Incarnations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Listing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Listing Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
The RMAN report Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Reporting on Datafiles That Have Not Been Backed Up Recently . . . . . . . . . . . 438
Reporting on Backup Redundancy or Recovery Window . . . . . . . . . . . . . . . . . 439
Reporting on Unrecoverable Operations on Datafiles . . . . . . . . . . . . . . . . . . . . 439
Reporting on the Database Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Reporting on Obsolete Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Data Dictionary Views for Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
18 Performance Tuning RMAN Backup and Recovery Operations . . . . . . . . . . . . . . . . . . 445
Before You Tune RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
RMAN Performance: What Can Be Achieved? . . . . . . . . . . . . . . . . . . . . . . . . . 446
Have the Right Hardware in Place . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Tune the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Tuning RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Tuning RMAN Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Tune the MML Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Identifying Database–Related RMAN Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Tracing RMAN Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

PART IV
RMAN in the Oracle Ecosystem
19 Duplication: Cloning the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
RMAN Duplication: A Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Why Use RMAN Duplication? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Different Types of RMAN Duplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
The Duplication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Duplication: Location Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Duplication to the Same Server: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . 474
Duplication to the Same Server, Different ORACLE_HOME . . . . . . . . . . . . . . . 475
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Contents xix
Duplication to a Remote Server: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . 475
Duplication and the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
RMAN Workshop: Build a Password File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Duplication to the Same Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
RMAN Workshop: Duplication to the Same Server, Using Disk Backups . . . . . 482
Using Tape Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Duplication to a Remote Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
RMAN Workshop: Duplication to a Remote Server, Using Disk Backups . . . . . 485
Using Tape Backups for Remote Server Duplication . . . . . . . . . . . . . . . . . . . . . 487
Target-Less Duplication in 11g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Incomplete Duplication: Using the DBNEWID Utility . . . . . . . . . . . . . . . . . . . 488
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
20 RMAN and Data Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
RMAN and the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Requirements for Using RMAN for Standby Database Creation . . . . . . . . . . . . 493
The duplicate…for standby Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
RMAN Workshop: Create a Standby Database Using RMAN . . . . . . . . . . . . . . 495
Taking Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

Datafile Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Archive Log Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . 499
Using Flashback Database for Standby Database Reinstantiation . . . . . . . . . . . 500
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
21 RMAN and Real Application Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Real Application Clusters: Unique Backup Challenges . . . . . . . . . . . . . . . . . . . . . . . . . 502
Datafile Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Archive Log Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
RAC Recovery Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Restore Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Media Management Considerations During a Restore . . . . . . . . . . . . . . . . . . . . 508
Recovery Considerations After a Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Advanced RMAN/RAC Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
Duplication to a Single-Node System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
RMAN Workshop: Duplicating a RAC Database to a Single-Node Database . . 510
The Single-Node Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
RMAN Workshop: Creating a Single-Node Standby Database from
a RAC Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
Backing Up the Multinode RAC Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
22 RMAN in Sync and Split Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Sync and Split: Broken Mirror Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Oracle Databases on Sync and Split Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
Datafiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Control Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Redo Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Archive Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Benefits of the Split Mirror Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Fast Point-In-Time Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Speedy-Looking Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
xx Oracle RMAN 11g Backup and Recovery
Mounting a Split Mirror Volume on Another Server . . . . . . . . . . . . . . . . . . . . . 523
Taking Backups from the Split Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
RMAN and Sync and Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
Registering Split Mirror Copies with RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
Taking RMAN Backups from the Split Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . 525
RMAN Workshop: Configure RMAN to Back Up from the Split Mirror . . . . . . . 526
Getting Sync and Split Functionality from Oracle Software . . . . . . . . . . . . . . . . 527
Using a Standby Database, Flashback Database, and Incremental
Apply for Sync and Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Benefits of the Oracle Sync and Split Solution . . . . . . . . . . . . . . . . . . . . . . . . . 528
Oracle-Integrated Shadow Copy Services for Windows . . . . . . . . . . . . . . . . . . . . . . . . 529
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
23 RMAN in the Workplace: Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Before the Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
What Is the Exact Nature of the Failure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
What Recovery Options Are Available? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Might Oracle Support Be Needed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Who Can Act as a Second Pair of Eyes During Recovery? . . . . . . . . . . . . . . . . . 533
Recovery Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Case #1: Recovering from Complete Database Loss (NOARCHIVELOG Mode)
with a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Case #2: Recovering from Complete Database Loss (NOARCHIVELOG Mode)
Without a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Case #3: Recovering from Complete Database Loss (ARCHIVELOG Mode)
Without a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Case #4: Recovering from Complete Database Loss (ARCHIVELOG Mode)
with a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Case #5: Recovering from the Loss of the SYSTEM Tablespace . . . . . . . . . . . . . 542

Case #6: Recovering Online from the Loss of a Datafile or Tablespace . . . . . . . 543
Case #7: Recovering from Loss of an Unarchived Online Redo Log . . . . . . . . . 544
Case #8: Recovering Through resetlogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
Case #9: Completing a Failed Duplication Manually . . . . . . . . . . . . . . . . . . . . 547
Case #10: Using RMAN Duplication to Create a Historical Subset
of the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Case #11: Recovering from a Lost Datafile (ARCHIVELOG Mode) Using
an Image Copy in the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . 550
Case #12: Recovering from Running the Production Datafile Out of the
Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Case #13: Using Flashback Database and Media Recovery to Pinpoint
the Exact Moment to Open the Database with resetlogs . . . . . . . . . . . . . . . . 553
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
PART V
Appendixes
A RMAN Syntax Reference Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
RMAN Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
RMAN Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
RMAN Specifier and Operands Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×