RMAN Recipes for Oracle Database 11g.pdf

所需积分/C币:3 2014-03-27 16:57:36 6.75MB PDF

RMAN Recipes for Oracle Database 11g.pdf
8512Ch00cMP47/27/076:21 AM Page i RMAN Recipes for Oracle Database 11g A Problem-Solution Approach Darl Kuhn, Sam Alapati, and Arup Nanda apress 8512Ch00CMP4 7/27/07 6: 21 AM Page ii RMAN Recipes for Oracle Database 11g: A Problem-Solution Approach Copyright o 2007 by Darl Kuhn, Sam Alapati, Arup Nanda All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher ISBN-13(pbk):978-1-59059-851-1 ISBN-10(pbk):1-59059-851-2 Printed and bound in the united states of america 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Jonathan Gennick Technical Reviewer: Bernard lopez Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jonathan Gennick Jason Gilmore, Jonathan Hassell, Chris Mills, Matthew Moodie, Jeffrey Pepper, Ben renow -Clarke, Dominic shakeshaft, Matt Wade. Tom Welsh Project Manager: Richard Dal Porto Copy Edit Manager: Nicole Flores Copy Editor: Kim Wimpsett Assistant Production Director: Kari Brooks-Copony Production Editor: Lori bring Compositor: Diana Van Winkle, Van Winkle Design Group Proofreader: Dan shaw Indexer: Broccoli Information Management Artist: Diana Van Winkle, Van Winkle Design Group Cover Designer: Kurt Krames Manufacturing director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, InC, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-nyospringer-sbm com, or visithttp://www.springeronline.com For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600 Berkeley,CA94705Phone510-549-5930,fax510-549-5939,e-mailinfo@apress.com,orvisit http://www.apress.com The information in this book is distributed on an"as is"basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work Thesourcecodeforthisbookisavailabletoreadersathttp://www.apress.comintheSourceCode Download section. You will need to answer questions pertaining to this book in order to successfully download the code 8512Ch00CMP4 7/27/07 6: 21 AM Page ii To Heidi, Lisa, and brandi. -Darl kuhn To my wife valerie; for herenormous support and sacrifice. -Sam Alapati To Anu and Anish --Arup nanda 8512Ch00CMP4 7/27/07 6: 21 AM Page iv 8512Ch00cMP47/27/076:21 AM Page V Contents at a glance Foreword...,,,,,,,,,,,,,,,,,,,,,, About the authors XXI About the technical reviewer Acknowledgments XXV Introduction XXIX CHAPTER 1 Backup and Recovery 101 CHAPTER 2 Jump-Starting RMAN 23 CHAPTER 3 Using the Flash Recovery Area 39 CHAPTER 4 Using RMAN CHAPTER 5 Configuring the rman environment 113 CHAPTER 6 Using the Recovery Catalog...............149 CHAPTER 7 Making Backups with RMAN...............177 CHAPTER 8 Maintaining RMAN Backups and the Repository....2 CHaPTER 9 Scripting RMAN 257 CHAPTER 10 Restoring the control File 295 CHAPTER 11 Performing Complete Recovery.............313 CHAPTER 12 Performing Incomplete Recovery............359 CHAPTER 13 Performing Flashback Recovery 385 CHAPTER 14 Handling online redo log failures 427 CHAPTER 15 Duplicating Databases and Transporting Data......443 CHAPTER 16 Tuning rman 491 CHAPTER 17 Troubleshooting RMAN 517 CHAPTER 18 Using a media management layer 545 CHAPTER 19 Performing Backup and Recovery with Enterprise Manager 583 CHAPTER 20 Using the data Recovery Advisor 611 CHAPTER 21 Using RMAN on Windows...............623 INDEX 645 8512Ch00CMP4 7/27/07 6: 21 AM Page vi 8512Ch00CMP4 7/27/07 6: 21 AM Page vii Contents Foreword...,,,,,,,,,,,,,,,,,,,,,, About the authors XXI About the technical reviewer Acknowledgments XXV Introduction XXIX CHAPTER 1 Backup and recovery 101 Types of Database Failures Oracle Backup and Recovery concepts............... 4 Backup type Recovery Types RMAN Architecture 15 Backup and recovery Best practices CHAPTER 2 Jump-Starting RMAN 23 2-1. Connecting to Your Database 2-2. Starting and Stopping Your Database.............. 27 2-3 Toggling Archivelog Mode.................. 29 2-4. Connecting to RMAN 2-5. Backing Up Your Database 2-6. Simulating a Failure 2-7. Restoring and Recovering Your Database 35 CHAPTER 3 Using the Flash Recovery Area 3-1. Creating the Flash Recovery Area 3-2. Writing regular rman backups to the Fra............ 4 3-3. Freeing FRA Space in an Emergency 3-4. Checking Space Usage in the FRA 47 3-5. Expanding or Shrinking the frA 3-6. Configuring archived Redo Logs to Go to FRA........... 53 3-7. Using the Same Fra for Two Databases with the Same Name 3-8. Placing a Control File in the fra 3-9. Placing Online redo Log Files in FRA.............. 63 3-10. Sending Image Copies to the FRA 70 3-11. Deleting Backup Sets from the FrA 8512Ch0oCMP4 7/27/07 6: 21 AM Page viii CONTENTS 3-12. Deleting Archived Redo Logs from the FrA 3-13. Reinstating a Damaged Datafile from an Image Copy 74 3-14. Switching Back from an Image Copy ...........................79 3-15. Backing Up the fRa to Ta 3-16. Sizing the Flash Recovery Area................ 83 CHAPTER 4 Using RMAN 4-1. Starting the RMAN client 4-2. Issuing RMAN Commands 4-3. Saving RMAN Output to a Text file 92 4-4. Logging Command-Line RMAN Output 93 4-5. Connecting to a Target Database from the RMAn Prompt 94 4-6. Connecting to a Target Database from the Operating System Command line 96 4-7. Executing Operating System Commands from Within RMAN 96 4-8 Scripting RMAN 97 4-9 Executing RMAN Command Files................ 99 4-10. Creating Dynamic Command Files ..101 4-11. Connecting to an Auxiliary Database 102 4-12. Executing Multiple rman Commands as a single Unit 103 4-13. Issuing SQL Statements from the RMAN Client......... 104 4-14. Starting and Shutting Down a Database with RMAN 4-15 Checking the Syntax of RMAN Commands ........... 107 4-16. Hiding Passwords When Connecting to RMAN 4-17 Identifying RMAN Server Sessions 110 4-18. Dropping a Database using the RMAN client 112 CHAPTER 5 Configuring the rMan Environment 113 5-1. Showing RMAN Configuration Settings 113 5-2. Configuring RMAN 116 5-3. Restoring Default Parameter Settings............. 1 5-4. Enabling and disabling automatic control File Backups 118 5-5. Specifying the autobackup Control File Directory and Filename 120 5-6. Specifying the Snapshot Control Filename and Location 121 5-7. Specifying the Retention Period for RMAN History..,....,. 122 5-8. Configuring the Default Device Type.............. 124 5-9. Configuring the Default Backup Type.............. 125 5-10. Making Compressed Backup Sets the Default 1, 126 5-11. Configuring Multiple backup Copies 5-12. Skipping Previously Backed Up Files . ............ 129 5-13. Specifying Backup Piece Filenames 133 5-14. Generating Filenames for Image Copies 134


关注 私信 TA的资源