- •About the Authors
- •Contents at a Glance
- •Contents
- •Table of Exercises
- •Introduction
- •Assessment Test
- •Answers to Assessment Test
- •What Is ASM?
- •Working with the ASM Instance
- •Overview of ASM Data Dictionary Views
- •Using ASM Storage
- •Using RMAN with ASM
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Understanding the Oracle Database as It Relates to Backup and Recovery
- •Performing Oracle Offline Backups
- •Performing Oracle Online Backups
- •Backing Up the Control File
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Performing Incomplete Recoveries
- •Performing Other Types of Recoveries
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Why Use RMAN?
- •Exploring the RMAN Architecture
- •Connecting to RMAN
- •Configuring RMAN for Use
- •Backing Up Your Database with RMAN
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Introducing the Recovery Catalog
- •Creating the Recovery Catalog User and Schema Objects
- •Using a Recovery Catalog
- •Maintaining the Recovery Catalog
- •Using the RMAN Virtual Private Catalog
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •RMAN Database-Recovery Basics
- •Using Image Copies to Recover Your Database
- •Other Basic Recovery Topics
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Switching Between RMAN Incarnations
- •Overview of RMAN Database Duplication
- •Performing an RMAN Tablespace Point-in-Time Recovery
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Overview of Flashback Technology
- •Using Automatic Undo Management
- •Using Flashback Technologies
- •Using Additional Flashback Operations
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Diagnosing the Database
- •Managing Database Performance
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Managing Memory
- •Managing Space
- •Managing Resources
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Automating Tasks with the Scheduler
- •Exploring the Scheduler Architecture
- •Exploring Common Administration Tools
- •Using Scheduler Jobs
- •Using Scheduler Programs
- •Using Schedules
- •Creating Lightweight Jobs
- •Using Job Chains
- •Using Scheduler Windows
- •Creating and Using Job Classes
- •Using Advanced Scheduler Concepts to Prioritize Jobs
- •Using Scheduler Views
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •An Overview of Globalization Support
- •Using NLS Parameters
- •Using Datetime Datatypes
- •Using Linguistic Sorts and Searches
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Lab 1.1: Creating an ASM Instance
- •Lab 1.2: Creating ASM Disk Groups
- •Lab 1.3: Using ASM Disk Groups from a Database
- •Lab 2.2: Putting the Database in ARCHIVELOG Mode
- •Lab 2.3: Executing a Manual Online (Hot) Backup
- •Lab 3.1: Executing a Time-Based Point-in-Time Recovery
- •Lab 3.2: Recovering from Control-File Loss with a Backup Control File
- •Lab 3.3: Recovering from Loss of the Current Online Redo Log
- •Lab 4.1: Creating an RMAN Offline Backup
- •Lab 4.2: Creating an RMAN Incremental Backup
- •Lab 4.3: Creating an Image-Copy Backup
- •Lab 5.1: Implementing RVPC
- •Lab 6.1: Restoring a Datafile Online
- •Lab 6.2: Performing a Change-Based Recovery with RMAN
- •Lab 6.3: Restoring a Control File from an Autobackup
- •Lab 7.1: Monitoring RMAN Backups
- •Lab 7.2: One of My Backups Is Missing!
- •Lab 8.1: Duplicating a Database Using Active Database Duplication
- •Lab 8.2: Duplicating a Database Using Backup-Based Duplication to a Different Point in Time
- •Lab 9.1: Using the Recycle Bin
- •Lab 9.3: Using Flashback Data Archive
- •Lab 10.1: Using Support Workbench to Report a Problem to Oracle Support
- •Lab 11.1: Exporting a Transportable Tablespace
- •Lab 11.2: Testing Resumable Space Allocation
- •Lab 11.3: Manually Configuring the SGA
- •Lab 12.1: Creating a Local External Job
- •Lab 12.2: Creating a Job Window
- •Lab 13.1: Using the Locale Builder to Create a New Linguistic Sort
- •Lab 13.2: Setting NLS Parameters
- •Lab 13.3: Performing Linguistic Sorts
- •What You’ll Find on the CD
- •System Requirements
- •Using the CD
- •Troubleshooting
- •Glossary
- •Index
Covers All Exam Objectives
Includes Real-World Scenarios, Over 100 Additional Pages of
Hands-On Exercises, and Leading-Edge Exam Prep Software
Featuring:
•Custom Test Engine
•Hundreds of Sample Questions
•Electronic Flashcards for PCs, Pocket PCs, and Palm Handhelds
•Entire Book in PDF
OCP
Oracle® Database 11g
Administrator Certified
Professional
STUDY GUIDE
Exam 1Z0-053
SERIOUS SKILLS.
Robert G. Freeman
Charles A. Pack
Doug Stuns
Tim Buterbaugh
OCP
Oracle® Database 11g
Administrator Certified
Professional
Study Guide
OCP
Oracle® Database 11g
Administrator Certified
Professional
Study Guide
Robert G. Freeman
Charles A. Pack
Doug Stuns
Tim Buterbaugh
Acquisitions Editor: Jeff Kellum Development Editor: Kim Wimpsett Technical Editors: Arup Nanda and Bob Bryla Production Editor: Christine O’Connor
Copy Editor: Judy Flynn Production Manager: Tim Tate
Vice President and Executive Group Publisher: Richard Swadley Vice President and Publisher: Neil Edde
Assistant Project Manager: Jenny Swisher Associate Producer: Angie Denny Quality Assurance: Josh Frank
Book Designer: Judy Fung, Bill Gibson
Compositor: Craig Woods, Happenstance Type-O-Rama Proofreader: Candace English
Indexer: Nancy Guenther
Project Coordinator, Cover: Lynsey Stanford Cover Designer: Ryan Sneed
Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada
ISBN: 978-0-470-39513-4
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Library of Congress Cataloging-in-Publication Data is available from the publisher.
TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in theUnited Statesand other countries, and may not be used without written permission. Oracle is a registered trademark of Oracle Corporation. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
10 9 8 7 6 5 4 3 2 1
Dear Reader,
Thank you for choosing OCP: Oracle Database 11g Administrator Certified Professional Study Guide. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.
Sybex was founded in 1976. More than thirty years later, we’re still committed to producing consistently exceptional books. With each of our titles we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.
I hope you see all that reflected in these pages. I’d be very interested to hear your comments and get your feedback on how we’re doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at nedde@wiley.com, or if you think you’ve found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.
Neil Edde
Vice President and Publisher
Sybex, an Imprint of Wiley
This book is dedicated to my wife, Lisa; my children; and my father. —Robert G. Freeman
For my wife, Donna, and our daughter, Jenny. —Charles A. Pack
Acknowledgments
Writing a book is such a vast undertaking that it’s hard to know where to start with the acknowledgments. I also hate writing this part because, frankly, someone always gets forgotten. That being said, here we go.
Thanks to my patient wife, Lisa, who sits across from me in our office and typically gets as little sleep as I do. Thanks to my kids who are still managing to grow up into wonderful adults in spite of this crazy world. Thanks to all my great friends at work who support me, who uplift me (imagine working at a job where you can start a meeting with a prayer!), and who are some very smart people. In particular, thanks to David Wright, Bill Johnson, Heber Allen, Jed Brunson, Dan Dredge, and Mandy Cosper. Additional thanks to Dave Prestwich, Mike Bowers, Stephen Shaffer, Brent Moody, and John Harper. Thanks also to my Core team guys Scott Black, Dennis Carlson, Ryan Allen, and Randy Knight. Also thanks to my way cool DBE team members Curt Workman, Bill Francis, Mike Noble, Ben Beishline, and Matthew Newman. You are all awesome. Thanks also to the rest of the EIM team at the church; you are awesome but too numerous to mention in the space I have here. I’ve worked with more awesome people that I can list in these pages. If I could list all your names here, I would. As it is, just know that I appreciate you and loved working with you over the years.
Writing books is a long, complex, and often frustrating task. Thanks to all the folks at Sybex that participated in the making of this book. Thanks to Jeff Kellum, who was my acquisitions editor, for getting me involved in this project. I’d worked with Jeff before on my very first book, and apparently he didn’t remember the pain I caused him well enough, since he asked me to write this book anyway. Thanks to Kim Wimpsett for awesome editing and being the best development editor ever! Thanks to Christine O’Connor for doing a bang-up job with the book and to Judy Flynn, copy editor extraordinaire, the proofreader Candace English, and to Nancy Guenther, indexer.
Finally, a very important thanks goes out to YOU. Thanks for buying this book. Thanks for wanting to become an Oracle Certified Professional. Thanks for any nice comments you might leave on websites here and there. Thanks for trusting us to help you succeed at the test!
—Robert G. Freeman
Thanks to Robert Freeman and Jeff Kellum for the opportunity to write this book. Thanks to David May, Gary Baird, and Greg Sinclair for providing a rock-solid infrastructure, not only in which to practice my art but also to the great benefit of my employer, CSX. Thanks to my capacity management team Chris Roessler, Harry Price, Brian Horan, Jan Shane, Joe Zuleger, and Derryck Zimmerman; my storage team Andy Brackett, Scott Gunter, Joe Fredrickson, Mike Able, John Anderson, Chris Griffith, Rick Ferry, Gene Pate, and Jim Gouvernante. To my coworkers Benny Kronz, Maritza Gonzalez, Chris Wilson, John Kall, Sandra Merwin, Duard Williams, Rich McClain, and Frank Lamon, for building a world-class Oracle database environment at CSX and for making it possible for me to continuously learn, develop, and teach.
viii Acknowledgments
This book would not have been written without my wife’s permission, of course. Thank you, Donna, for being by my side through these projects, especially during the summer months in Florida. Thank you to my daughter, Jenny, who is 7 and sitting next to me on the sofa writing stories on her MacBook about Chihuahuas and leopard geckos while I write about “the Oracle.”
—Charles A. Pack
About the Authors
Robert G. Freeman lives in Salt Lake City, Utah, and is a principle database engineer with the Church of Jesus Christ of Latter-day Saints. Robert has been working with Oracle for some 20 years now. After the latest economic explosion, Robert expects that he will continue to be working for at least another 20 years. He has shelved his pending midlife career-change plans to become a maniacal recluse living in a cabin out in the middle of nowhere due to the economic crisis and current state of his 401(k).
Besides working with Oracle databases (that’s his story and he’s sticking to it), Robert writes an occasional book (at last count 12 or so), flies airplanes, enjoys karate, and has a family that is awesome. He met Charles Pack, who is a fellow Okie (even if he sometimes roots for the wrong school) years ago and to this day wonders if Charles will ever walk around without wearing sunglasses to hide his eyes and the deep meaning contained in them. Robert is the husband of the patient Lisa and father of five wonderful, if not occasionally misguided, children.
If you liked this book and want to email Robert, you can do so at dbaoracle@aol.com. If you didn’t like this book, then make sure you remember that Charles A. Pack wrote it and email him instead.
Charles A. Pack is an Oracle Certified Professional DBA with over 20 years of IT experience. His career has included the roles of PC repairman, network administrator, systems operator, COBOL programmer, backup and storage engineer, DBA, architect, project manager, and people manager. He earned the Bachelor of Science degree from Oklahoma State University, the MBA from the University of Oklahoma, and the Master of Science in Computer Science from Texas A&M University – Corpus Christi. He has taught Oracle DBA classes at Florida Community College Jacksonville and has presented on the subject at universities and to professional organizations. He authored the Oracle Press Oracle9i Database: OCP 9i Performance Tuning Exam Guide and collaborated with coauthor Robert Freeman on the Oracle 8 to 8i Upgrade Exam Cram. In his current role as technical director of hardware provisioning at CSX Technology in Jacksonville, Florida, he and his teams are responsible for enterprise storage, backups, capacity planning, and performance. He is a true Cowboy at heart, and he loves to barbecue.
Contents at a Glance
Introduction |
|
xxiii |
|
Assessment Test |
|
xxxv |
|
Chapter |
1 |
Using Oracle ASM |
1 |
Chapter |
2 |
Performing Oracle User-Managed Backups |
55 |
Chapter |
3 |
Performing Oracle User-Managed Database Recoveries |
103 |
Chapter |
4 |
Configuring and Backing Up Using RMAN |
153 |
Chapter |
5 |
Using the RMAN Recovery Catalog |
209 |
Chapter |
6 |
Recovering Databases with RMAN |
229 |
Chapter |
7 |
Reporting, Monitoring, and Tuning with RMAN |
279 |
Chapter |
8 |
Performing Oracle Advanced Recovery |
313 |
Chapter |
9 |
Understanding Flashback Technology |
349 |
Chapter |
10 |
Diagnosing the Database and Managing Performance |
399 |
Chapter |
11 |
Managing Database Resources |
455 |
Chapter |
12 |
Using the Scheduler to Automate Tasks |
561 |
Chapter |
13 |
Implementing Globalization Support |
617 |
Appendix |
A |
Lab Exercises |
679 |
Appendix |
B |
About the Companion CD |
783 |
Glossary |
|
|
787 |
Index |
|
|
801 |