OCA: Oracle 10g™ Administration I Study Guide Chip Dawes Bob Bryla Joseph C. Johnson Matthew Weishan SYBEX® OCA: Oracle 10 g Administration I Study Guide 4367.book Page i Friday, October 15, 2004 9:53 PM 4367.book Page ii Friday, October 15, 2004 9:53 PM San Francisco • London OCA: Oracle 10 g ™ Administration I Study Guide Chip Dawes Bob Bryla Joseph C. Johnson Matthew Weishan 4367.book Page iii Monday, October 18, 2004 8:51 PM Associate Publisher: Neil Edde Acquisitions and Developmental Editor: Jeff Kellum Production Editor: Mae Lum Technical Editors: Christopher Guillaume, Robert Wahl Copyeditor: Pat Coleman Compositor: Craig Woods, Happenstance Type-O-Rama Graphic Illustrator: Jeffrey Wilson, Happenstance Type-O-Rama CD Coordinator: Dan Mummert CD Technician: Kevin Ly Proofreaders: James Brook, Sunah Cherwin, Amy Rasmussen, Nancy Riddiough Indexer: Jack Lewis Book Designers: Bill Gibson, Judy Fung Cover Designer: Archer Design Cover Photographer: Photodisc and Victor Arre Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic, or other record, without the prior agreement and written per- mission of the publisher. Library of Congress Card Number: 2004094992 ISBN: 0-7821-4367-9 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries. Screen reproductions produced with FullShot 99. FullShot 99 © 1991-1999 Inbit Incorporated. All rights reserved. FullShot is a trademark of Inbit Incorporated. The CD interface was created using Macromedia Director, COPYRIGHT 1994, 1997-1999 Macromedia Inc. For more information on Macromedia and Macromedia Director, visit http://www.macromedia.com. SYBEX is an independent entity from Oracle Corporation and is not affiliated with Oracle Corporation in any manner. This publication may be used in assisting students to prepare for an Oracle Certified Associate exam. Neither Oracle Corporation nor SYBEX warrants that use of this publication will ensure passing the relevant exam. Oracle is either a registered trademark or a trademark of Oracle Corporation in the United States and/or other countries. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer. The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s). The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book. Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 4367.book Page iv Friday, October 15, 2004 9:53 PM To Our Valued Readers: Thank you for looking to Sybex for your Oracle 10g exam prep needs. The OCA certification is designed to validate knowledge of basic database administration tasks and an understand- ing of the Oracle database architecture and how its components work and interact with one another. The OCA is also a prerequisite to becoming an OCP. We at Sybex are proud of the reputation we’ve established for providing Oracle certification candidates with the practical knowledge and skills needed to succeed in the highly competitive IT marketplace. It has always been Sybex’s mission to teach individuals how to utilize tech- nologies in the real world, not to simply feed them answers to test questions. Just as Oracle is committed to establishing measurable standards for certifying database professionals, Sybex is committed to providing those professionals with the means of acquiring the skills and knowledge they need to meet those standards. As always, your feedback is important to us. If you believe you’ve identified an error in the book, please send a detailed e-mail to support@sybex.com. And if you have general comments or suggestions, feel free to drop me a line directly at nedde@sybex.com. At Sybex, we’re con- tinually striving to meet the needs of individuals preparing for certification exams. Good luck in pursuit of your Oracle certification! Neil Edde Associate Publisher—Certification Sybex, Inc. 4367.book Page v Friday, October 15, 2004 9:53 PM Software License Agreement: Terms and Conditions The media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files (the “Software”) to be used in connection with the book. SYBEX hereby grants to you a license to use the Software, subject to the terms that follow. Your purchase, acceptance, or use of the Soft- ware will constitute your acceptance of such terms. The Software compilation is the property of SYBEX unless otherwise indicated and is protected by copyright to SYBEX or other copyright owner(s) as indicated in the media files (the “Owner(s)”). You are hereby granted a single-user license to use the Software for your personal, noncommercial use only. You may not repro- duce, sell, distribute, publish, circulate, or commercially exploit the Software, or any portion thereof, without the written consent of SYBEX and the specific copyright owner(s) of any component software included on this media. In the event that the Software or components include specific license requirements or end-user agreements, statements of condition, disclaimers, limitations or war- ranties (“End-User License”), those End-User Licenses supersede the terms and conditions herein as to that par- ticular Software component. Your purchase, accep- tance, or use of the Software will constitute your acceptance of such End-User Licenses. By purchase, use or acceptance of the Software you fur- ther agree to comply with all export laws and regula- tions of the United States as such laws and regulations may exist from time to time. Software Support Components of the supplemental Software and any offers associated with them may be supported by the specific Owner(s) of that material, but they are not sup- ported by SYBEX. Information regarding any available support may be obtained from the Owner(s) using the information provided in the appropriate read.me files or listed elsewhere on the media. Should the manufacturer(s) or other Owner(s) cease to offer support or decline to honor any offer, SYBEX bears no responsibility. This notice concerning support for the Software is provided for your information only. SYBEX is not the agent or principal of the Owner(s), and SYBEX is in no way responsible for providing any support for the Software, nor is it liable or responsible for any support provided, or not provided, by the Owner(s). Warranty SYBEX warrants the enclosed media to be free of phys- ical defects for a period of ninety (90) days after pur- chase. The Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com . If you discover a defect in the media during this warranty period, you may obtain a replace- ment of identical format at no charge by sending the defective media, postage prepaid, with proof of pur- chase to: SYBEX Inc. Product Support Department 1151 Marina Village Parkway Alameda, CA 94501 Web: http://www.sybex.com After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of purchase, and a check or money order for $10, payable to SYBEX. Disclaimer SYBEX makes no warranty or representation, either expressed or implied, with respect to the Software or its contents, quality, performance, merchantability, or fit- ness for a particular purpose. In no event will SYBEX, its distributors, or dealers be liable to you or any other party for direct, indirect, special, incidental, consequen- tial, or other damages arising out of the use of or inabil- ity to use the Software or its contents even if advised of the possibility of such damage. In the event that the Soft- ware includes an online update feature, SYBEX further disclaims any obligation to provide this feature for any specific duration other than the initial posting. The exclusion of implied warranties is not permitted by some states. Therefore, the above exclusion may not apply to you. This warranty provides you with specific legal rights; there may be other rights that you may have that vary from state to state. The pricing of the book with the Software by SYBEX reflects the allocation of risk and limitations on liability contained in this agree- ment of Terms and Conditions. Shareware Distribution This Software may contain various programs that are distributed as shareware. Copyright laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights. If you try a share- ware program and continue using it, you are expected to register it. Individual programs differ on details of trial periods, registration, and payment. Please observe the requirements stated in appropriate files. Copy Protection The Software in whole or in part may or may not be copy-protected or encrypted. However, in all cases, reselling or redistributing these files without authoriza- tion is expressly forbidden except as specifically pro- vided for by the Owner(s) therein. 4367.book Page vi Friday, October 15, 2004 9:53 PM To my children Zachary and Charlie, you bring joy to my life. —Chip Dawes To my three wonderful daughters: Rachel, Laura, and Alyssa —Matthew Weishan To Brenda and Emily —Joseph C. Johnson To Mary Christine and the kids —Bob Bryla 4367.book Page vii Friday, October 15, 2004 9:53 PM Acknowledgments We would like to thank Oracle for producing the great database software that this book is about, as well as the Sybex team who did all the behind-the-scenes work on the book. We, the authors, get our names on the cover of the book, but the following people helped significantly in creating this Study Guide, and we want to thank and acknowledge their efforts: acquisitions and developmental editor Jeff Kellum; production editor Mae Lum; copyeditor Pat Coleman; technical editors Chris Guillaume and Bob Wahl; compositor Craig Woods of Happenstance Type-O-Rama; illustrator Jeffrey Wilson of Happenstance Type-O-Rama; proofreaders James Brook, Sunah Cherwin, Amy Rasmussen, and Nancy Riddiough; indexer Jack Lewis; and all the other unnamed individuals who had a hand in bringing this book to fruition. I’d like to thank the good software engineers at Oracle for developing and continuing to improve a great software product. I’ve spent many good years learning about and teaching others to use Oracle databases, and I still have so much more to learn. Lastly and most importantly, I’d like to thank my family for the unceasing support I get from them. —Chip Dawes I’d like to thank all the contributors to this book for their time and efforts. I’d also like to thank the entire Sybex team for their input and assistance in the production of this work. The third time has been a charm. —Matthew Weishan Many thanks to all those who helped me during the development of this book, in particular: Tony Gastel, Gerry Bustamente, Stephen Deutsch, Brook Swenson, Tami Van Dreese, Jamie Mudrick, Brenda, and Emily. Thanks too to my co-authors Chip, Bob, and Matt. —Joseph C. Johnson This book wouldn’t be possible without the love and support from my family throughout the long nights and weekends when I still managed to find time to help the kids with their home- work before bedtime. I loved every minute of it. Thanks also to my professional colleagues, both past and present, who provided me with inspiration, support, and guidance and who pushed me a little further to take a risk now and then, starting with that math teacher in high school, whose name eludes me at the moment, who introduced me to computers on a DEC PDP-8 with a teletype and a paper tape reader. —Bob Bryla 4367.book Page viii Friday, October 15, 2004 9:53 PM Contents at a Glance Introduction xvii Assessment Test xxx Chapter 1 Oracle Database 10 g Components and Architecture 1 Chapter 2 Creating and Controlling a Database 75 Chapter 3 Database Storage and Schema Objects 135 Chapter 4 Oracle Net Services 185 Chapter 5 Oracle Shared Server 269 Chapter 6 User Administration and Security 309 Chapter 7 Managing Data With SQL, PL/SQL, and Utilities 357 Chapter 8 Managing Consistency and Concurrency 401 Chapter 9 Proactive Database Maintenance and Performance Monitoring 431 Chapter 10 Implementing Database Backups 499 Chapter 11 Implementing Database Recovery 543 Glossary 587 Index 605 4367.book Page ix Friday, October 15, 2004 9:53 PM [...]... database administration, application developer, and web application server administrator tracks Within each track, Oracle has a multitiered certification program Within the administration track, there are three tiers: The first tier is the Oracle 10g Certified Associate (OCA) To obtain OCA certification, you must pass the 1Z0-042 Oracle Database 10g: Administration I exam in a proctored setting The... during weak economic times This book is intended to help you pass the Oracle Database 10g: Administration I exam, which will establish your credentials as an Oracle Database Administrator The OCA certification is a prerequisite to obtaining the more comprehensive Oracle Certified Professional (OCP) certification and is the first step toward obtaining an Oracle Certified Master (OCM) certification Using... tier is the Oracle 10g Certified Professional (OCP), which builds on and requires OCA certification To obtain OCP certification, you must attend an approved Oracle University hands-on class and pass the 1Z0-043 Oracle Database 10g: Administration II exam in a proctored setting The third and highest tier is the Oracle 10g Certified Master (OCM), which builds on and requires OCP certification To obtain... track Oracle Database 10g Administrator Certified Associate The Oracle 10g Administrator Certified Associate (OCA) certification is a streamlined, entrylevel certification for the database administration track and is required to advance toward the more senior certification tiers This certification requires you to pass one exam that demonstrates your knowledge of Oracle basics: 1Z0-042 Oracle Database 10g: ... Role Privileges Controlling Resource Usage by Users Assigning Tablespace Quotas Assigning Resource Limits with a Profile Applying the Principle of Least Privilege Managing Default User Accounts Implementing Standard Password Security Features Auditing Database Activity Managing Statement Auditing Managing Privilege Auditing Managing Object Auditing Purging the Audit Trail Managing Fine-Grained Auditing... best paid in the IT industry Salary surveys consistently show the OCP certification to yield higher salaries than other certifications, including Microsoft, Novell, and Cisco So whether you are beginning your career, changing your career, or looking to secure your position as a DBA, this book is for you! xviii Introduction Oracle Certifications Oracle certifications follow a track that is oriented... 10g: Administration I Introduction xix Oracle Database 10g Administrator Certified Professional The OCP tier of the database administration track challenges you to demonstrate your enhanced experience and knowledge of Oracle technologies The Oracle 10g Administrator Certified Professional (OCP) certification requires achievement of the OCA certification, attendance at one or more approved Oracle University... Oracle University classes, and successful completion of the following exam: 1Z0-043 Oracle Database 10g: Administration II The approved courses for OCP candidates include the following: Oracle Database 10g: Administration I Oracle Database 10g: Administration II Oracle Database 10g: Introduction to SQL Oracle Database 10g: New Features for Administrators Oracle Database 10g: Program with PL/SQL If you already... 605 Introduction There is high demand for professionals in the information technology (IT) industry, and Oracle certifications are the hottest credentials in the database world You have made the right decision to pursue your Oracle certification, because achieving it will give you a distinct advantage in this highly competitive market Most of you should already be familiar with Oracle and need no introduction... Security Accessibility Configuring Oracle Net on the Server Understanding the Oracle Listener Managing Oracle Listeners Dynamically Registering Services Additional Configurations When Using Multiple Listeners Troubleshooting Server-Side Connection Problems Oracle Net Logging and Tracing on the Server Configuring Oracle Net for the Client Client-Side Names Resolution Options The Hostnaming Method The Oracle . OCA: Oracle 10g Administration I Study Guide Chip Dawes Bob Bryla Joseph C. Johnson Matthew Weishan SYBEX® OCA: Oracle 10 g Administration I Study Guide 4367.book Page i Friday,. Database Administrator. The OCA certifica- tion is a prerequisite to obtaining the more comprehensive Oracle Certified Professional (OCP) certification and is the first step toward obtaining an Oracle. Activity 336 Managing Statement Auditing 338 Managing Privilege Auditing 343 Managing Object Auditing 344 Purging the Audit Trail 345 Managing Fine-Grained Auditing 346 Summary 349 Exam Essentials