Although the OCP exams for Database Administration can be taken in any order, it is generally recommended that the Oracle8i OCP certification exam for Architecture and Administration and
Trang 1OCP: Oracle8i DBA Architecture & Administration and Backup & Recovery
Study Guide
Trang 2OCP: Oracle8i™ DBA Architecture & Administration and Backup & Recovery
Study Guide
Doug Stuns Biju Thomas
Trang 3Associate Publisher: Richard Mills
Contracts and Licensing Manager: Kristine O’Callaghan
Acquisitions and Developmental Editors: Kim Goodfriend, Richard Mills
Editor: Sharon Wilkey
Production Editor: Leslie E H Light
Technical Editors: Bob Bryla, Betty MacEwen
Book Designer: Bill Gibson
Graphic Illustrator: epic
Electronic Publishing Specialists: Bill Gibson, Jill Niles, Judy Fung, Nila Nichols, Susie Hendrickson
Proofreaders: Laurie OConnell, Nancy Riddiough, Camera Obscura
Indexer: Ted Laux
CD Coordinator: Kara Eve Schwartz
CD Technicians: Keith McNeil, Siobhan Dowling
Cover Designer: Archer Design
Cover Illustrator/Photographer: Photo Researchers
Copyright © 2001 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 permission of the publisher.
Library of Congress Card Number: 01-106432
ISBN: 0-7821-2683-9
SYBEX and the SYBEX logo are trademarks of SYBEX Inc in the USA and 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 Professional 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 par- ticular 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
Trang 4Software 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
Software 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 reproduce, sell, distribute, publish,
circulate, or commercially exploit the Software, or any
por-tion 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
con-dition, disclaimers, limitations or warranties ("End-User
License"), those End-User Licenses supersede the terms and
conditions herein as to that particular Software component
Your purchase, acceptance, or use of the Software will
consti-tute your acceptance of such End-User Licenses.
By purchase, use or acceptance of the Software you further agree
to comply with all export laws and regulations of the United
States as such laws and regulations may exist from time to time.
Reusable Code in This Book
The authors created reusable code in this publication expressly
for reuse for readers Sybex grants readers permission to reuse for
any purpose the code found in this publication or its
accompany-ing CD-ROM so long as all three authors are attributed in any
application containing the reusable code, and the code itself is
never sold or commercially exploited as a stand-alone product.
Software Support
Components of the supplemental Software and any offers
asso-ciated with them may be supported by the specific Owner(s) of
that material but they are not supported by SYBEX
Informa-tion 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
sup-port or decline to honor any offer, SYBEX bears no
responsibil-ity 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 physical
defects for a period of ninety (90) days after purchase The
Soft-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 replacement of identical format at no charge by sending the defective media, postage prepaid, with proof of pur- chase to:
SYBEX Inc.
Customer Service Department
1151 Marina Village Parkway Alameda, CA 94501 (510) 523-8233 Fax: (510) 523-2373 e-mail: info@sybex.com 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 pur- chase, 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 fitness for a particular pur- pose In no event will SYBEX, its distributors, or dealers be lia- ble to you or any other party for direct, indirect, special, incidental, consequential, or other damages arising out of the use of or inability to use the Software or its contents even if advised of the possibility of such damage In the event that the Software includes an online update feature, SYBEX further dis- claims 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 agreement of Terms and Conditions.
Shareware Distribution
This Software may contain various programs that are uted as shareware Copyright laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights If you try a shareware program and continue using it, you are expected to register it Individ- ual programs differ on details of trial periods, registration, and payment Please observe the requirements stated in appropriate files.
distrib-Copy Protection
The Software in whole or in part may or may not be protected or encrypted However, in all cases, reselling or redistributing these files without authorization is expressly
Trang 5copy-To Cathy—Doug Stuns
To Shiji—Biju Thomas
Trang 6First, I want to thank the Lord, my savior, for making this all possible.Next, my parents, Ron and Jan Stuns, for without them I would not be who I am and would not have had the fortitude necessary to write this book
My parents have been there for me throughout my life and have supported everything that I have done
My lovely wife of 11 years, Cathy, has been my major support in this cess and encouraged me to start this task knowing full well of the time com-mitment She is always my biggest and best supporter in every circumstance
pro-I am so happy that she has been there to support me throughout
My wonderful children, Brant and Brea, 8 and 6 years of age, have ported and tolerated me through this process as well The many hours away from them has been difficult for each of us, but their understanding has been incredible Brant and Brea went so far as to join me in the den pretending to help write and review sections so that we could spend more time together Without their understanding and support, I would not have been able to complete this task I am so proud of them both
sup-Numerous other people have helped to contribute to the completion and ultimate success of this project, and I owe them sincere appreciation
I want to thank Rick and Matt for reviewing questions and other cal materials
techni-I am greatly thankful to the staff at Sybex First, Technical Editors Bob Bryla and Betty MacEwen, for their diligent work and attention to detail Next, Editor Sharon Wilkey, whose great efforts to correct and smooth out some rough edges made this process much easier Production Editor Leslie E
H Light was always there to help in any way possible I also thank Associate Publisher Richard Mills for his support and follow-through Unseen, but not unappreciated, Bill Gibson, Jill Niles, and the rest of the Electronic Publish-ing Specialists at Sybex created the look you see here and made sure each page was a marriage of form and function.It has been my pleasure to work with all of you
Finally, I want to thank all of the many professional people whom I have had the privilege to work with in my career I have learned much and owe many thanks!
—Doug Stuns
Trang 7viii Acknowledgments
I would like to thank Richard and Leslie for their help, guidance, and patience throughout the process of writing this book Thank you, Sharon, for the edits and suggestions—your hard work certainly helped to complete the project on time Bob and Betty, your technical reviews helped enor-mously to raise the quality of this book—thank you Bill and Jill, you made this book look great Thank you also
I also thank Wendy and all my colleagues for their never-failing support—you are a great team to work with I thank my friends for inspiring and encouraging me
Finally, I owe big thanks to my wife, Shiji, who gave me all the support when I needed it the most Thank you for giving up your weekends and eve-nings when I was working on this book
—Biju Thomas
Trang 8There is high demand and competition for professionals in the Information Technology (IT) industry, and the Oracle Certified Professional (OCP) cer-tification is the hottest credential in the database realm You have made the right decision to pursue certification Being an OCP will give you a distinct advantage in this highly competitive market
Many readers may already be familiar with the Oracle Corporation and its products and services For those who aren’t familiar with the company, Oracle Corporation, founded in 1977, is the world’s leading database com-pany and second largest independent software company, with revenues of more than $9.7 billion and clients in more than 145 countries Oracle’s CEO, Lawrence J Ellison, saw the future of information technology in Inter-net computing, and the Oracle8i database was created to meet the needs of this technological evolution
This book is intended to help you continue on your exciting new path toward obtaining the Oracle8i certified database administrator certification The book will give you the necessary knowledge of the Oracle Server archi-tecture and the hands-on skills you need to pass Exams 1Z0-023 and 1Z0-
025 Although the OCP exams for Database Administration can be taken in any order, it is generally recommended that the Oracle8i OCP certification exam for Architecture and Administration and the Oracle8i OCP certifica-tion exam for Backup and Recovery be the final exams taken in the series
Why Become an Oracle Certified Professional?
The number one reason to become an Oracle Certified Professional is to gain more visibility and greater access to the industry’s most challenging oppor-tunities The OCP program is Oracle’s commitment to provide top-quality resources for technical professionals who want to become Oracle specialists
in specific job roles The certification tests are scenario based, which is the most effective way to access your hands-on expertise and critical problem-solving skills
Certification is proof of your knowledge and shows that you have the skills required to support Oracle’s core products according to the standards established by Oracle The OCP program can help a company identify proven performers who have demonstrated their skills to support the company’s
Trang 9Oracle Database Administrator
Oracle Application Developer
Oracle Database Operator
Oracle Java Developer
Oracle Financial Applications Consultant
Oracle Database Administrator (DBA)
The role of Database Administrator (DBA) has become a key to success in today’s highly complex database systems The best DBAs work behind the scenes, but are in the spotlight when critical issues arise They plan, create, and maintain databases to ensure that the databases meet the data manage-ment needs of the business DBAs also monitor the databases for perfor-mance issues and work to prevent unscheduled downtime Being an effective DBA requires a broad understanding of the architecture of Oracle databases and expertise in solving system-related problems The Oracle8i certified administrator track consists of the following five tests:
1Z0-001: Introduction to Oracle—SQL and PL/SQL
1Z0-023: Oracle8i—Architecture and Administration
1Z0-024: Oracle8i—Performance and Tuning
1Z0-025: Oracle8i—Backup and Recovery
1Z0-026: Oracle8i—Network Administration
Trang 10Introduction xxvii
Oracle Application Developer
This track tests your skills in client-server and Web-based application opment using Oracle application development tools such as Developer/2000, SQL, PL/SQL, and SQL*Plus The following five tests comprise this track:
devel- 1Z0-001: Introduction to Oracle—SQL and PL/SQL
1Z0-101: Develop PL/SQL Program Units
1Z0-111: Developer/2000 Forms 4.5 I
1Z0-112: Developer/2000 Forms 4.5 II
1Z0-113: Developer/2000 Reports 2.5
Oracle Database Operator (DBO)
A Database Operator (DBO) performs simple operational tasks on Oracle databases in a support role to the DBA DBOs need an introductory knowl-edge of the commands and utilities associated with managing a database DBOs also install and set up databases, create users, and perform routine backups You need to take the following test to be certified as a Database Operator:
1Z0-401: Database Operator
Oracle Java Developer
This certification track is part of the Certification Initiative for Enterprise Development, a multi-vendor collaboration with Sun Microsystems, IBM, Novell, and the Sun-Netscape Alliance to establish standards for knowledge and skill levels for enterprise developers in the Java technology The Initia-tive recognizes three levels of certification requiring five tests At each skill level, a certificate is awarded to candidates who successfully pass the required exams in that level
Level 1: Sun Certified Programmer
1Z0-501: Sun Certified Programmer for the Java 2 Platform
Level 2: Certified Solution Developer
1Z1-502: Oracle JDeveloper: Develop Database Applications with Java (Oracle JDeveloper, Release 2)
Trang 11xxviii Introduction
or
1Z1-512: Oracle JDeveloper: Develop Database Applications with Java (Oracle JDeveloper, Release 3)
1Z0-503: Object-Oriented Analysis and Design with UML
Level 3: Certified Enterprise Developer
1Z0-504: Enterprise Connectivity with J2EE
1Z0-505: Enterprise Development on the Oracle Internet Platform
Oracle Financial Applications Consultant
This certification tests your expertise in Oracle Financial applications These exams are designed to test your knowledge of the business processes incor-porated into the Oracle Financial applications software The following three tests comprise this track, and the third exam offers a specialization in either Procurement or Order Fulfillment:
OCP: Database Administrator Track
The Oracle8i Database Administrator certification consists of five tests, and Sybex offers several study guides to help you achieve the OCP Database Administrator Certification There are three books in this series:
OCP: Oracle8i™ DBA SQL and PL/SQL Study Guide
Trang 12Introduction xxix
OCP: Oracle8i™ DBA Architecture & Administration and Backup
& Recovery Study Guide
OCP: Oracle8i™ DBA Performance Tuning and Network tration Study Guide
Adminis-Additionally, these three books are offered in a boxed set:
OCP: Oracle8i™ DBA Certification Kit
Table F.1 lists the five exams for the DBA track, their scoring, and the Sybex study guides that will help you pass each exam
T A B L E F 1 OCP Database Administrator Tests and Passing Scores
Exam # Title
Total Questions
Questions Correct
Trang 13xxx Introduction
Skills Required for DBA Certification
Understanding RDBMS concepts
Writing queries and manipulating data
Creating and managing users and database objects
Understanding PL/SQL programming and constructs
Understanding Oracle Server architecture—Database and Instance
Completely understanding physical and logical database storage concepts
Managing data—storage, loading, and reorganization
Managing roles, privileges, passwords, and resources
Understanding backup and recovery options
Archiving redo log files and hot backups
Using Recovery Manager (RMAN) to perform backup and recovery operations
Creating and managing standby database
Identifying and tuning database and SQL performance
Interpreting data dictionary views and database parameters
Configuring Net8 on the server side and client side
Using multi-threaded server, connection manager, and Oracle Names
Understanding graphical and character mode backup, recovery, and administration utilities
Tips for Taking OCP Exams
Each OCP test contains about 60–80 questions to be completed in about 90 minutes Answer the questions you know first, so that you
do not run out of time
Many questions on the exam have answer choices that at first glance look identical Read the questions carefully Don’t just jump
to conclusions Make sure that you are clear about exactly what each question asks
Trang 14Introduction xxxi
Many of the test questions are scenario based Some of the scenarios contain non-essential information and exhibits You need to be able to identify what’s important and what’s not
Do not leave any questions unanswered There is no negative scoring You can mark a difficult question or a question you are unsure about and come back to it later
When answering questions that you are not sure about, use a process of elimination to get rid of the obviously incorrect answers first Doing this greatly improves your odds if you need to make an educated guess
What Does This Book Cover?
This book covers everything you need to know to pass both the OCP:
Oracle8i DBA Architecture & Administration and OCP: Oracle8i DBA Backup & Recovery exams The first part of the book covers the configura-tion, architecture, and administration of an Oracle database The second part covers the topics of backup and recovery, including using traditional techniques as well as RMAN
Part One: OCP: Oracle8i DBA Architecture & Administration
Chapter 1 starts with an overview of the Oracle database configuration and its architecture It discusses what constitutes an instance and a database, and the various background processes that communicate with the Oracle database.Chapter 2 discusses the administrator authentication methods and the stages in starting and stopping the Oracle database This chapter also intro-duces the Oracle Enterprise Manager utilities
Chapter 3 introduces you to the steps required in database creation and how to prepare OS environment and parameter files The database admin-istrative packages and database event triggers are also discussed
Chapter 4 covers two important constituents of the Oracle database—the control file and redo log file You will learn the importance and use of these files in this chapter
Chapter 5 is dedicated to managing tablespaces The types of tablespaces and their configuration and storage are discussed
Chapter 6 discusses the logical storage structures such as blocks, extents, and segments Creating and managing rollback segments are discussed
Chapter 7 covers creating and managing tables and its associated tures such as indexes and constraints
Trang 15Part Two: Oracle8i DBA Backup & Recovery
Chapter 10 starts with an overview of the backup and recovery process and configurations
Chapter 11 discusses the recovery structures and processes as well as the types of failures
Chapter 12 introduces how to configure the database for backup and recovery This chapter also describes the differences between ARCHIVELOGand NOARCHIVELOG modes
Chapter 13 covers how to perform physical backups without Recovery Manager It includes implications of closed and opened backups, Nologging and Logging options, control file backups, and special issues associated with read-only tablespaces
Chapter 14 covers how to perform complete recovery without Recovery Manager This chapter focuses primarily on the differences between ARCHIVELOG and NOARCHIVELOG mode recoveries
Chapter 15 discusses how to perform incomplete recovery without Recovery Manager This chapter has a special section on how to recover after losing current and inactive nonarchived redo log files
Chapter 16 introduces the Export and Import utilities and how these ities complement the backup process It includes an example of the tablespace point-in-time recovery (TSPITR)
util-Chapter 17 introduces additional recovery issues, such as parallel ery and recovering a database with missing data files There is also a section
recov-on issues associated with read-recov-only tablespaces
Chapter 18 covers more Oracle utilities for troubleshooting the database
This chapter focuses on detecting corruption, diagnosing and solving lems via trace files, and using the LogMiner utility to reconstruct redo log transactions
prob-Chapter 19 introduces Oracle Recovery Manager, providing an overview that includes its components and capabilities
Trang 16Introduction xxxiii
Chapter 20 demonstrates Recovery Manager’s catalog creation and tenance It covers how to query the recovery catalog and create, run, and store RMAN scripts
main-Chapter 21 covers backups using Recovery Manager It discusses the types of RMAN backups, tuning backups, and performing incremental and cumulative backups
Chapter 22 discusses restoration and recovery using Recovery Manager and has specific examples of types of recoveries
Chapter 23 covers the Oracle standby database, including its complete configuration and setup It provides examples of using the standby database
in specific scenarios
Each chapter ends with review questions that are specifically designed to help you retain the knowledge presented To really nail down your skills, read each question carefully and answer the questions
Where Do You Take the Exam?
You may take the exams at any of the more than 800 Sylvan Prometric Authorized Testing Centers around the world For the location of a testing center near you, call 1-800-891-3926 Outside of the United States and Can-ada, contact your local Sylvan Prometric Registration Center The tests can
be taken in any order
To register for an Oracle Certified Professional exam:
Determine the number of the exam you want to take
Register with the nearest Sylvan Prometric Registration Center At this point, you will be asked to pay in advance for the exam At the time
of this writing, the exams are $125 each and must be taken within one year of payment You can schedule exams up to six weeks in advance
or as soon as one working day prior to the day you wish to take it If something comes up and you need to cancel or reschedule your exam appointment, contact Sylvan Prometric at least 24 hours in advance
When you schedule the exam, you’ll get instructions regarding all appointment and cancellation procedures, the ID requirements, and information about the testing-center location
Trang 17You can also register for the test online at http://www.2test.com/register/frameset.htm If you live outside the United States, register online at http://www.2test.com/register/testcenterlocator/ERN_intl_IT&FAA.htm.
How to Use This Book
This book can provide a solid foundation for the serious effort of preparing for the Oracle Certified Professional Architecture & Administration and Backup & Recovery exams To best benefit from this book, use the following study method:
1. Take the Assessment Tests immediately following this introduction (The answers are at the end of each test.) Carefully read over the explanations for any questions you get wrong, and note which chap-ters the material comes from This information should help you plan your study strategy
2. Study each chapter carefully, making sure that you fully understand the information and the test objectives listed at the beginning of each chapter Pay extra close attention to any chapter for which you missed questions in the Assessment Tests
3. Closely examine the sample queries that are used throughout the book You may find it helpful to type in the samples and compare the results shown in the book to those on your system Once you’re com-fortable with the content in the chapter, answer the review questions related to that chapter (The answers appear at the end of the chapter, after the review questions.)
When typing in examples from the book, do not type the line numbers that appear in the sample output; the Oracle query tools automatically number lines for you.
4. Note the questions that confuse you, and study those sections of the book again
5. Take the Practice Exams in this book You’ll find them in Appendix A and Appendix B The answers appear at the end of the exams
Trang 18Introduction xxxv
6. Before taking the exam, try your hand at the bonus exams that are included on the CD that comes with this book The questions in these exams appear only on the CD This will give you a complete overview
of what you can expect to see on the real thing
7. Remember to use the products on the CD that is included with this book The electronic flashcards and the EdgeTest exam preparation software have all been specifically picked to help you study for and pass your exams Oracle also offers sample exams on their certifica-tion Web site: http://education.oracle.com/certification/ The electronic flashcards can be used on your Windows computer or
on your Palm device
To learn all the material covered in this book, you’ll have to apply yourself regularly and with discipline Try to set aside the same time period every day to study, and select a comfortable and quiet place to do so If you work hard, you will be surprised at how quickly you learn this material All the best!
What’s on the CD?
We worked hard to provide some really great tools to help you with your tification process All of the following tools should be loaded on your work-station when studying for the test
cer-The EdgeTest for Oracle Certified DBA Preparation
Software
Provided by EdgeTek Learning Systems, this test preparation software pares you to successfully pass the OCP: Oracle8i DBA Architecture & Administration and Backup & Recovery exams In this test engine, you will find all of the questions from the book, plus additional Practice Exams that appear exclusively on the CD You can take the Assessment Tests, test your-self by chapter, take the Practice Exams that appear in the book or on the
pre-CD, or take an exam randomly generated from any of the questions
Electronic Flashcards for PC and Palm Devices
After you read the book, read the review questions at the end of each chapter
and study the practice exams included in the book and on the CD But wait, there’s more! Test yourself with the flashcards included on the CD If you can get through these difficult questions, and understand the answers, you’ll
Trang 19know you’re ready for the OCP: Oracle8i DBA Architecture & tion and Backup & Recovery exams.
Administra-The flashcards include over 150 questions specifically written to hit you hard and make sure you are ready for the exam Between the review questions, practice exam, and flashcards, you’ll be more than prepared for the exam
OCP: Oracle8i DBA Architecture & Administration and Backup & Recovery Study Guide Ebook
Sybex is now offering the Oracle Certification books on CD, so you can read them on your PC or laptop They are in Adobe Acrobat format Acrobat Reader 4 is also included on the CD
This will be extremely helpful to readers who fly and don’t want to carry
a book, as well as to readers who find it more comfortable reading from their computer
How to Contact the Authors
To contact Biju Thomas, you can e-mail him at biju@bijoos.com or visit his Web site for DBAs at www.bijoos.com/oracle
You can reach Doug Stuns via e-mail at stuns@scs-corp.net Doug Stuns recommends that you register at technet.oracle.com to get access to the Oracle8i documentation, including information for all of the RMAN commands as well as other useful information about Oracle8i
About the Authors
Biju Thomas is an Oracle Certified Professional with more than six years of Oracle database administration and application development experience
He has written articles for Oracle Magazine and Oracle Internals.
Doug Stuns is an Oracle Certified Professional with more than 10 years of experience with Oracle databases He is currently president and founder of SCS, Inc., an Oracle-based consulting company in Scottsdale, Arizona For-merly Doug worked for the Oracle Corporation for five years, serving as senior principal technical consultant focusing on DBA consulting and cus-tomized education projects
Trang 20OCP: Oracle8i Architecture & Administration Assessment Test
1. What happens when one of the redo members of the next group is unavailable when LGWR has finished writing the current log file?
A. Database operation will continue uninterrupted
B. The database will hang; do an ALTER DATABASE SWITCH LOGFILE
to skip the unavailable redo log
C. The instance will be shut down
D. LGWR will create a new redo log member, and the database will continue to be in operation
2. How do you change the status of a database to restricted availability,
if the database is already up and running? Choose the best answer
A. Shut down the database and start the database using STARTUP RESTRICT
B. Use the ALTER DATABASE RESTRICT SESSIONS command
C. Use the ALTER SYSTEM ENABLE RESTRICTED SESSION command
D. Use the ALTER SESSION ENABLE RESTRICTED USERS command
3. Which background process updates the online redo log files with the redo log buffer entries when a COMMIT occurs in the database?
A. DBWn
B. LGWR
C. CKPT
D. CMMT
Trang 21xxxviii Assessment Test
4. Analyze the following statement On which tablespace will the back segment R01 be created?
roll-CREATE ROLLBACK SEGMENT R01;
A. The default tablespace of the user creating the rollback segment
B. In the RBS tablespace
C. In the SYSTEM tablespace
D. The statement will return an error You must specify a tablespace when creating a rollback segment
5. Choose two extent management options available for tablespaces
6. Which component in the following list is not part of the SGA?
A. Database buffer cache
Trang 22OCP: Oracle8i Architecture & Administration Assessment Test xxxix
8. The ALTER INDEX … REBUILD command cannot
A. Move index to a new tablespace
B. Change the INITIAL extent size of the index
C. Collect statistics on the index
D. Specify a new name for the index
9. Choose a file that is not used by the SQL*Loader utility for input or output
B. Execute, parse, fetch
C. Parse, execute, fetch
D. Parse, fetch, execute
11. Which script creates the data dictionary tables?
A. catalog.sql
B. catproc.sql
C. sql.bsq
D. dictionary.sql
12. How do you collect statistics for a table?
A. ALTER TABLE <TABLE_NAME> COMPUTE STATISTICS
B. ANALYZE TABLE <TABLE_NAME> COMPUTE STATISTICS
C. ALTER TABLE <TABLE_NAME> COLLECT STATISTICS
Trang 23B. You can query the SGA by using dynamic views.
C. The control file, data files, and redo log files are open
D. The control file, data files, and redo log files are all closed
Trang 24OCP: Oracle8i Architecture & Administration Assessment Test xli
17. Which of the following clauses will affect the size of the control file when creating a database? Choose two
19. How is the database character set specified?
A. When you create the database
B. In the initialization parameter file
C. In the environment variable
D. Using ALTER SESSION
20. When you create a user with a default tablespace of USERS and you do not specify the temporary tablespace, which tablespace will be the user’s temporary tablespace?
Trang 2522. Choose two space management parameters used to control the free space usage in a data block.
James: REVOKE SELECT ON CUSTOMER FROM JULIE;
A. James cannot revoke privileges from Julie because Julie has granted the privilege to Alex
B. Julie loses the privilege on CUSTOMER, but Alex keeps the privilege
C. Julie and Alex lose privileges on CUSTOMER
D. Alex loses the privilege on CUSTOMER, but Julie keeps the privilege
25. How do you prevent row migration?
A. Specify larger PCTFREE
B. Specify larger PCTUSED
C. Specify large INITIAL and NEXT sizes
Trang 26OCP: Oracle8i Architecture & Administration Assessment Test xliii
26. The following are the steps required for relocating a data file ing to the USERS tablespace Order the steps in their proper sequence
belong-A. Copy the file ‘/disk1/users01.dbf’ to ‘/disk2/
users01.dbf’ using an OS command
B. ALTER DATABASE RENAME FILE ‘/disk1/users01.dbf’ TO ‘/disk2/users01.dbf’
C. ALTER TABLESPACE USERS OFFLINE
D. ALTER TABLESPACE USERS ONLINE
27. Which initialization parameter specifies that no more than the fied number of seconds’ worth of redo log blocks need to be read dur-ing instance recovery?
Trang 2730. Choose the statement that is true.
A. To grant a role, you must have the DBA role
B. To grant a role, you must have been granted the role with the WITH ADMIN OPTION clause
C. When a role is created, it has all system privileges
D. When a role is created, it does not have any privileges
31. Which DBMS package is associated with the transportable tablespace feature?
A. DBMS_TTS
B. DBMS_TRANSPORT
C. DBMS_TABLESPACES
D. DBMS_TRANSPORT_TABLESPACES
Trang 28Answers to Assessment Test xlv
Answers to Assessment Test
1. A When one of the redo log members becomes unavailable, Oracle writes an error message in the alert log file and the database operation continues uninterrupted When all the redo log members of a group are unavailable, the instance shuts down For more information, see Chapter 4
2. C Though answer A is correct, the more appropriate answer is C You can use the ALTER SYSTEM command to enable or disable restricted access to the database To learn about sessions and database start-up/shutdown options, turn to Chapter 2
3. B The LGWR process is responsible for writing the redo log buffer entries to the online redo log files The LGWR process writes to the redo log files when a COMMIT occurs, when a checkpoint occurs, when
the DBWn writes dirty buffers to disk, or every three seconds To learn
more about the background processes and database configuration, refer to Chapter 1
4. C If you do not specify a tablespace for the rollback segment, it will
be created in the SYSTEM tablespace Rollback segments are always owned by SYS If you do not specify the storage parameters, the roll-back segment will be created with the default storage parameters spec-ified for the tablespace Rollback segment creation and management are discussed in Chapter 6
5. A and C When the extent management options are handled through the dictionary, the tablespace is known as dictionary managed When the extent management is done using bitmaps in the data files belong-ing to the tablespace, it is known as locally managed The default is dictionary managed, which was the only management class available prior to Oracle8i For more information, refer to Chapter 5
6. C The sort area is not part of the SGA; it is part of the PGA The sort area is allocated to the server process when required See Chapter 1 for more information on the components of the SGA and an overview of the Oracle database architecture
Trang 297. B To enable complex password verification, you must create a tion that verifies the password and returns a Boolean result if the new password is acceptable This function should be owned by SYS and is specified in the PASSWORD_VERIFY_FUNCTION of the profile To learn more about profiles and password management, refer to Chapter 8.
func-8. D To rename an index, you must use the ALTER INDEX <old_name>
RENAME TO <new_name>, but you cannot combine a rename with
any other index operation When rebuilding an index, you can specify
a new tablespace and new storage parameters The index can be rebuilt in parallel, and you can specify COMPUTE STATISTICS to col-lect statistics Indexes are discussed in Chapter 7
9. D The text file is not a specific file type used by SQL*Loader per
se The control file specifies the table name, data format, etc.; the parameter file specifies the command-line parameters in a file; the bad file has the records rejected by Oracle or SQL*Loader with an error code; and the data file has the data to be loaded To learn about data-loading utilities, refer to Chapter 9
10. C The SQL query (SELECT statement) is executed in three major stages In the parse stage, the query is checked for errors and privileges and is parsed in the shared SQL area In the execute stage, the parsed code is executed In the fetch stage, data is fetched from data files See Chapter 1 for more information on query processing steps
11. C The script sql.bsq is executed automatically by the CREATE DATABASE command and it creates the data dictionary base tables The catalog.sql script creates the data dictionary views To learn more about the other scripts and data dictionary, refer to Chapter 3
12. B The ANALYZE command is used to collect statistics on the table COMPUTE STATISTICS reads all the blocks of the table and collects the statistics ESTIMATE STATISTICS takes a few rows as a sample and collects statistics Collecting statistics and validating structure by using the ANALYZE command are discussed in Chapter 7
13. D When you connect to the database by using the SYSDBA privilege, you are really connecting to the SYS schema If you use SYSOPER, you will be connected as PUBLIC To learn more about administrator
Trang 30Answers to Assessment Test xlvii
14. C The MINIMUM EXTENT parameter is used to make sure each extent is a multiple of the value specified This parameter is useful to reduce fragmentation in the tablespace For more information, refer
of segments, see Chapter 6
16. A and B When the database is in the MOUNT state, the control file is opened to get information about the data files and redo log files You can query the SGA information by using the V$ views as soon as the instance is started, that is, in the NOMOUNT state More information about database start-up steps is in Chapter 2
17. A and D The clauses MAXDATAFILES, MAXLOGFILES, MAXLOGMEMBERS, MAXINSTANCES, and MAXHISTORY affect the size of the control file Oracle pre-allocates space in the control file for the maximums you specify To learn more about database creation, refer to Chapter 3
18. C The ARCHIVE LOG LIST command shows whether the database is
in ARCHIVELOG mode, whether automatic archiving is enabled, the archival destination, and the oldest, next, and current log sequence numbers Refer to Chapter 4
19. A The database character set and national character set are specified
at database creation time and in most cases it cannot be changed National Language Support (NLS) features in Oracle8i are discussed
in Chapter 9
20. C If you do not specify a default for the user’s temporary tablespace, the user is assigned SYSTEM as the default and temporary tablespace Managing users is discussed in Chapter 8
21. D COMMIT is an invalid database event The trigger on the SHUTDOWN event fires before closing the database, the STARTUP trigger fires after opening the database, and SERVERERROR fires after encountering an error For more on database event triggers, refer to Chapter 3
Trang 3122. B and D PCTFREE and PCTUSED are the space management ters that control space in a block PCTFREE specifies the percent of space that should be reserved for future updates (which can increase the length of the row), and PCTUSED specifies when Oracle can start reinserting rows to the block once PCTFREE is reached PCTFREE and PCTUSED together cannot exceed 100 To learn about space manage-ment parameters, refer to Chapter 6.
parame-23. B You can have a maximum of eight control files per database It is recommended to keep the control files on different disks For more information, see Chapter 4
24. C When object privileges are revoked, the revoke cascades to all els For system privileges, the revoke does not cascade To learn about system and object privileges, refer to Chapter 8
lev-25. A PCTFREE specifies the free space reserved for future updates to rows By specifying a larger value for PCTFREE, more free space is available in each block for updates Row migration is when a row is updated and there is not enough space to hold the row; Oracle then moves the entire row to a new block, leaving a pointer in the old block
To learn about data block free space management, refer to Chapter 7
26. C, A, B, and D To rename a data file, you need to take the tablespace offline, so that Oracle does not try to update the data file while you are renaming Using OS commands, copy the data file to the new location, and using the ALTER DATABASE RENAME FILE command
or the ALTER TABLESPACE RENAME FILE command, rename the file in the database’s control file To rename the file in the database, the new file should exist Bring the tablespace online for normal database oper-ation For more information on relocating data files, see Chapter 5
27. B LOG_CHECKPOINT_TIMEOUT ensures that no more than the fied number of seconds’ worth of redo log blocks need to be read dur-ing instance recovery LOG_CHECKPOINT_INTERVAL ensures that no more than the specified number of redo log blocks (OS blocks) need to
speci-be read during instance recovery See Chapter 4
Trang 32Answers to Assessment Test xlix
28. D The DBA_CONS_COLUMNS view has the column name and position that belongs to the constraint To find the primary key constraint name, query the DBA_CONSTRAINTS view with CONSTRAINT_TYPE and TABLE_NAME in the WHERE clause To learn about constraints, read Chapter 7
29. B and C The DBA_DATA_FILES view has the size of each data file assigned to the tablespace; the total size of all the files is the size of the tablespace Similarly, if the tablespace is locally managed and tempo-rary, you need to query the DBA_TEMP_FILES view For more infor-mation, see Chapter 5
30. D When a role is created, no privileges are associated with it You must grant privileges (object and system privileges) by using the GRANT command A user with the GRANT ANY ROLE privilege can grant roles
to other users To learn about roles, refer to Chapter 8
31. A DBMS_TTS is associated with transportable tablespaces; the cedure TRANSPORT_SET_CHECK can be used to verify that the
pro-tablespaces in the transportable list are self-contained To learn about transportable tablespaces, refer to Chapter 9
Trang 33OCP: Oracle8i Backup & Recovery Assessment Test
1. What type of failure requires the DBA to get involved and is most often the most serious? Choose all that apply
Trang 34lii Assessment Test
4. If you are using the LOG_ARCHIVE_DEST_N parameter to protect your archive log files from media, what is the maximum number
6. How do archive logs aid in the backup and recovery process?
A. Allow recovery to beyond the point of failure
B. Allow recovery up to the point of failure
C. Allow imports
D. Recover uncommitted transactions
7. Which two data dictionary views can you use to determine whether a tablespace is still in backup mode?
Trang 35OCP: Oracle8i Backup & Recovery Assessment Test liii
8. Which RMAN command executes a stored RMAN script?
A. EXECUTE
B. RUN
C. START
D. @
9. What is the reason for having database checkpoints?
A. To write log buffer information to redo log files
B. To have the LGWR process write log buffer information to redo log files
C. To have the modified shared pool buffers written to the database files
D. To have the modified database buffers written to the database files
10. In NOARCHIVELOG mode, which media failure scenario would not require a complete restore of all data files?
A. The online redo logs have not been recycled since the last backup
B. The online redo logs have been recycled since the last backup
C. The archive logs have not been recycled since the last backup
D. A table export has been performed
11. What information is necessary to create a new control file for a database?
A. The names of the database files
B. The name of the database
C. The location of the init.ora file
D. All the names and locations of all database files
Trang 36liv Assessment Test
12. Which are two activities that are well suited for the Export and Import utilities?
A. Rebuilding and reorganizing tables
B. Creating a physical backup
C. Creating a cold physical backup
D. Creating a logical archive of a database at a point in time
E. Creating a backup control file
13. What command is necessary to restore files to a new location?
A. To save long-term backup information
B. The recovery catalog manager is mandatory with RMAN
C. It improves performance
D. It is needed to reduce disk space
Trang 37OCP: Oracle8i Backup & Recovery Assessment Test lv
16. Which mode should you start the standby database in to receive
changes from the primary database?
A. STARTUP NOMOUNT
B. STARTUP FORCE
C. STARTUP
D. STARTUP MOUNT
17. Which of the following statements best describes correctly
multi-plexed redo logs?
A. A redo group with one redo log member on one disk
B. A redo group with two members, each member on a separate disk
C. A redo group with two members, each member on the same disk
D. A redo group with three members, each member on the same disk
18. What is the primary purpose of the media management layer? Choose
the best answer
A. To back up data files to disk
B. To back up backup sets to disk
C. To back up image copies to disk
D. To back up data files to tape
19. What is the maximum number of archive log processes allowed?
A. 2
B. 5
C. 10
D. 8
Trang 38lvi Assessment Test
20. You must perform a recovery because of incorrect DELETE statements that were made to the database Which type of recovery would be best
writ-A. Data may be lost or unrecoverable
B. All transactions in the current redo log are lost
C. This has no effect on the recovery process
D. All data can be recovered in every situation, but it can be very difficult
Trang 3924. What type of files will not be backed up in a backup set?
C. OPEN ARCHIVLOG mode
D. USING BACKUP CONTROLFILE
Trang 40lviii Assessment Test
28. What command must be performed after each incomplete recovery is validated and tested?
A. RESYNCH DATABASE
B. RESET DATABASE
C. SET DATABASE
D. REGISTER DATABASE
29. What RMAN command is used to start up a target database identified
by brdb when using RMAN ? Choose the best answer
A. RMAN> SHUTDOWN IMMEDIATE
B. RMAN> SHUTDOWN MOUNT
C. SQL> RMAN STARTUP MOUNT
D. RMAN> STARTUP MOUNT
30. If you open the primary database with an ALTER DATABASE OPEN RESETLOGS command, what effect does this have on the standby database?
A. No impact on the standby database; it is automatically updated
B. Minimal impact on the standby database, but more impact on the primary database
C. It invalidates the standby database
D. No effect only if the standby database is in managed recovery mode
31. Analyze this Server Manager command to determine which action the command will accomplish:
SVRMGR> alter database rename file2> ‘/db01/ORACLE/brdb/data01.dbf’ to3>’ /db02/ORACLE/brdb/data01.dbf’;
A. Move the data file in the OS to the new location
B. Update the control file with the new physical location
C. Update the recovery catalog
D. Recover the data file