没有合适的资源?快使用搜索试试~ 我知道了~
首页APress RMAN Recipes for Oracle Database 11g A Problem-Solution Approach
资源详情
资源评论
资源推荐
Darl Kuhn, Sam Alapati, and Arup Nanda
RMAN Recipes for
Oracle Database 11g
A Problem-Solution Approach
8512Ch00CMP4 7/27/07 6:21 AM Page i
RMAN Recipes for Oracle Database 11g:A Problem-Solution Approach
Copyright © 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 9 8 7 6 5 4 3 2 1
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 Lopuz
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-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600,
Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit
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.
The source code for this book is available to readers at http://www.apress.com in the Source Code/
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
Contents at a Glance
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
About the Technical Reviewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
■CHAPTER 1 Backup and Recovery 101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
■CHAPTER 2 Jump-Starting RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
■CHAPTER 3 Using the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
■CHAPTER 4 Using RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
■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 . . . . . . . . . 225
■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
v
8512Ch00CMP4 7/27/07 6:21 AM Page v
Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
About the Technical Reviewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
■CHAPTER 1 Backup and Recovery 101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Types of Database Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Oracle Backup and Recovery Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Backup Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Recovery Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
RMAN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Backup and Recovery Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
■CHAPTER 2 Jump-Starting RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2-1. Connecting to Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2-2. Starting and Stopping Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2-3. Toggling Archivelog Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2-4. Connecting to RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2-5. Backing Up Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2-6. Simulating a Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2-7. Restoring and Recovering Your Database . . . . . . . . . . . . . . . . . . . . . . . . 35
■CHAPTER 3 Using the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3-1. Creating the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3-2. Writing Regular RMAN Backups to the FRA . . . . . . . . . . . . . . . . . . . . . . . 41
3-3. Freeing FRA Space in an Emergency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3-4. Checking Space Usage in the FRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3-5. Expanding or Shrinking the FRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3-6. Configuring Archived Redo Logs to Go to FRA . . . . . . . . . . . . . . . . . . . . . 53
3-7. Using the Same FRA for Two Databases with the Same Name . . . . . . . . . 55
3-8. Placing a Control File in the FRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
vii
8512Ch00CMP4 7/27/07 6:21 AM Page vii
3-12. Deleting Archived Redo Logs from the FRA . . . . . . . . . . . . . . . . . . . . . . 73
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 Tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3-16. Sizing the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
■CHAPTER 4 Using RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4-1. Starting the RMAN Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4-2. Issuing RMAN Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
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. . . . . . . . . . . . . . . 106
4-15. Checking the Syntax of RMAN Commands . . . . . . . . . . . . . . . . . . . . . 107
4-16. Hiding Passwords When Connecting to RMAN . . . . . . . . . . . . . . . . . . . 109
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 . . . . . . . . . . . . . . . . . . . . . . . . . . 117
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 . . . . . . . . . . . . . . . . . . . 126
5-11. Configuring Multiple Backup Copies . . . . . . . . . . . . . . . . . . . . . . . . . . 127
5-12. Skipping Previously Backed Up Files . . . . . . . . . . . . . . . . . . . . . . . . . 129
5-13. Specifying Backup Piece Filenames . . . . . . . . . . . . . . . . . . . . . . . . . . 133
5-14. Generating Filenames for Image Copies . . . . . . . . . . . . . . . . . . . . . . . 134
■CONTENTSviii
8512Ch00CMP4 7/27/07 6:21 AM Page viii
剩余691页未读,继续阅读
pigking4016
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0