“Damir Bersinic delivers a clearly written, comprehensive guide — with hundreds of targeted exam-prep questions — that is sure to help Oracle professionals prepare for and pass the secon
Trang 1O racle8i DBA:
Architecture and Administration
BERSINIC, ROSS & SABININ
The only guide you need for Oracle8i DBA
Architecture and Administration exam success
You’re holding in your hands the most comprehensive and effective guide available for the second exam on the Oracle8 i DBA track An outstanding team of Oracle professionals and trainers delivers crystal-clear
explanations of every topic covered, highlighting exam-critical concepts and offering hands-on tips that can help you in your real-world DBA career Throughout, they provide pre-tests, exam-style assessment questions, scenario problems, and lab exercises — everything you need to master the material and pass the exam.
“Damir Bersinic delivers a clearly written, comprehensive guide — with hundreds of targeted exam-prep questions — that is sure to help Oracle professionals prepare for and pass the second Oracle
certification exam.”
— Harry Liebschutz, Senior Oracle Consultant, HDL Consulting, Inc.,
and author of The Oracle Cookbook
on CD-ROM
Damir Bersinic, Oracle Trainer, MCDBA, MCSE+I, MCT,
Todd Ross, and Yury Sabinin
Certification
“Damir Bersinic delivers a clearly written, comprehensive guide — with hundreds of targeted exam-prep questions — that is sure to help Oracle professionals prepare for and pass the second Oracle
certification exam.”
— Harry Liebschutz, Senior Oracle Consultant, HDL Consulting, Inc.,
and author of The Oracle Cookbook
VISIBLE SPINE 2.375
Inside, get complete coverage of Architecture and Administration exam objectives
• Get a handle on Oracle8i architecture and server basics
• Create Oracle databases, data dictionary views, and standard packages
• Manage Oracle instances, tablespaces, and datafiles
• Maintain the control file and redo log files
• Delve into storage structure and relationships
• Take control of rollback segments, tables, and indexes
• Get the scoop on maintaining data integrity
• Discover how to load and reorganize data
• Master Oracle security, from passwords and resources to users, privileges, and roles
• Find out how to make the most of Natural Language Support
Hungry Minds Test Engine powered by
Architecture and Administration
About the Authors
Damir Bersinic, MCDBA Oracle DBA, Oracle Trainer,
MCSE+I, MCT, has worked with Oracle databases since
1989 and has taught Oracle Official Curriculum courses for the last four years He is the founder and president
of Bradley Systems, Inc., a firm specializing in database,Internet, and system integration consulting and training
Todd Ross is a Senior Oracle and UNIX instructor, as well
as the Corporate Oracle Stream Leader, for TMI-Learnix Ltd
Yury Sabinin is an Oracle Certified Professional (DBA)
who is currently a full-time trainer with TMI-Learnix Ltd,and a consultant
™
Test-Prep Tools on CD-ROM
• Hungry Minds test engine powered by top-rated Boson Software
• A searchable e-version of the book
• Trial versions of the Introduction
to Oracle8i Architecture &
Administration and WebDBA
System Requirements:
PC running Windows NT (Service Pack 6a or later) orWindows 2000 (Service Pack 1 or later); 300 MHz orfaster; at least 64MB RAM; 2GB free hard disk space
See the About the CD-ROM appendix for details andcomplete system requirements
You can specify schedule parameters
in the Export Wizard
Select the characteristics of the database that you want
to create with the Database Configuration Assistant
To connect to an Oracle Management Server provide proper credentials
Trang 2Oracle8 i ™ DBA: Architecture and Administration Certification Bible
Trang 4Oracle8i ™ DBA:
Architecture and Administration Certification Bible
Damir Bersinic, Todd Ross, Yury Sabinin
Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters • Branded Web Sites • e-Learning
New York, NY ✦ Cleveland, OH ✦ Indianapolis, IN
Trang 5Oracle8i ™DBA: Architecture and Administration Certification Bible
Published by
Hungry Minds, Inc.
909 Third Avenue New York, NY 10022 www.hungryminds.com Copyright © 2002 Hungry Minds, Inc All rights reserved No part of this book, including interior design, cover design, and icons, may be reproduced
or transmitted in any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher.
Library of Congress Control Number: 2001092906 ISBN: 0-7645-4817-4
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1 1P/TQ/RR/QR/IN Distributed in the United States by Hungry Minds, Inc.
Distributed by CDG Books Canada Inc for Canada;
by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by IDG Books Australia Publishing Corporation Pty Ltd for Australia and New Zealand; by TransQuest Publishers Pte Ltd for Singapore, Malaysia, Thailand, Indonesia, and Hong Kong; by Gotop Information Inc for Taiwan; by ICG Muse, Inc for Japan; by Intersoft for South Africa;
by Eyrolles for France; by International Thomson Publishing for Germany, Austria, and Switzerland;
by Distribuidora Cuspide for Argentina; by
LR International for Brazil; by Galileo Libros for Chile; by Ediciones ZETA S.C.R Ltda for Peru;
by WS Computer Publishing Corporation, Inc., for the Philippines; by Contemporanea de Ediciones for Venezuela; by Express Computer Distributors for the Caribbean and West Indies; by Micronesia Media Distributor, Inc for Micronesia; by Chips Computadoras S.A de C.V for Mexico; by Editorial Norma de Panama S.A for Panama; by American Bookshops for Finland.
For general information on Hungry Minds’ products and services please contact our Customer Care department within the U.S at 800-762-2974, outside the U.S at 317-572-3993 or fax 317-572-4002 For sales inquiries and reseller information, including discounts, premium and bulk quantity sales, and foreign-language translations, please contact our Customer Care department at 800-434-3422, fax 317-572-4002 or write to Hungry Minds, Inc., Attn: Customer Care Department, 10475 Crosspoint Boulevard, Indianapolis, IN 46256 For information on licensing foreign or domestic rights, please contact our Sub-Rights Customer Care department at 212-884-5000.
For information on using Hungry Minds’ products and services in the classroom or for ordering examination copies, please contact our Educational Sales department at 800-434-2086 or fax
317-572-4005.
For press review copies, author interviews, or other publicity information, please contact our Public Relations department at 317-572-3168 or fax 317-572-4168.
For authorization to photocopy items for corporate, personal, or educational use, please contact Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, or fax 978-750-4470.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST EFFORTS IN PREPARING THIS BOOK THE PUBLISHER AND AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE THERE ARE NO WARRANTIES WHICH EXTEND BEYOND THE DESCRIPTIONS CONTAINED IN THIS PARAGRAPH NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS THE ACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONS STATED HEREIN ARE NOT GUARANTEED OR WARRANTED TO PRODUCE ANY PARTICULAR RESULTS, AND THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY INDIVIDUAL NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES.
Trademarks: Hungry Minds and related tradedress are trademarks of Hungry Minds, Inc All other
trademarks are the property of their respective owners Hungry Minds, Inc., is not associated with any product or vendor mentioned in this book.
is a trademark of Hungry Minds, Inc.
Trang 6About the Authors
Damir Bersinic has over seventeen years of industry experience working with
Oracle, SQL Server, Microsoft Windows NT/2000, BackOffice, and other advancedproducts He is President and founder of Bradley Systems Incorporated, a MicrosoftCertified Partner focusing on database, Internet, and system integration consultingand training He holds a number of industry certifications including Oracle Certified
Professional (DBA) for Oracle 7.3, 8, and 8i; Microsoft Certified Systems Engineer
(MCSE); Microsoft Certified Database Administrator (MCDBA); Microsoft CertifiedTrainer (MCT); and Certified Technical Trainer (CTT) His extensive work withOracle, SQL Server, Windows NT/2000, and BackOffice has enabled him to providehigh-level consulting and other assistance to clients in Canada, the United States,and other parts of the globe He is an avid fan of Formula 1 and CART racing andcan be found in front of his large-screen TV on almost all race weekends When he’snot working, he enjoys time with his wife Visnja and son Anthony Damir can bereached via e-mail at damir@bradsys.com
Todd Ross is a Senior Oracle and UNIX instructor, as well as the Corporate Oracle
Stream Leader, for TMI-Learnix Ltd He is a Certified Oracle Professional in Oracle
7.3, 8.0, and 8i He also runs an Oracle and Informix consulting company that
spe-cializes in database and SQL tuning as well as corporate backup and recoverystrategies Over the past eight years, Todd has been involved in Oracle implementa-
tions ranging from Oracle 6 to 8i on several different operating systems such as
VAX, UNIX, NT, and 2000 all around the world Todd is currently working with
Oracle9i and trying to spend as much time as possible at home with his wife and
two young children
Yury Sabinin is an Oracle Certified Professional (DBA) living in Vancouver, British
Columbia, Canada, with his wife and son He has been involved in the industrysince 1987 He is currently a full-time trainer with TMI-Learnix Ltd., teaching Oracleand other courses He is also a consultant at SYM IT Services Ltd., a Vancouver con-sulting firm In his spare time (not that he has any), he collects mechanical watchesand tries to stay as far away from computers as possible
Trang 7Editorial Manager
Kyle Looper
Project Coordinator
Dale White
Graphics and Production Specialists
Laurie Petrone, Jill Piscitelli, Jacque Schneider, Brian Torwelle,Jeremey Unger
Quality Control Technicians
Laura Albert, David Faust, John Greenough, Andy Hollandbeck,Robert Springer
Permissions Editor
Laura Moss
Media Development Specialist
Travis Silver
Proofreading and Indexing
TECHBOOKS Production Services
Trang 8I would like to dedicate this book to what a colleague of mine refers to as the lightbulbs — the look in the eye of a student or reader when the pieces fall into place.
As you continue your journey in Oracle certification with this book, may you be blessed with many lightbulbs.
Damir Bersinic
Trang 9Preparing to become an Oracle Certified Professional in the database
adminis-tration (DBA) track is a journey that starts with a single step If you havealready passed the “Introduction to Oracle: SQL & PL/SQL” exam you have takenthat first step and are well on your way The next step in the process is to take and
pass the “Oracle8i: Architecture and Administration” exam, a task which this book
is designed to help you accomplish
In order to become an Oracle Certified Professional (OCP) in the DBA track for
Oracle8i, you will need to pass the following examinations:
✦ Exam 1Z0-001: Introduction to Oracle: SQL & PL/SQL
✦ Exam 1Z0-023: Oracle8i Architecture and Administration
✦ Exam 1Z0-025: Oracle8i Backup and Recovery
✦ Exam 1Z0-024: Oracle8i Performance and Tuning
✦ Exam 1Z0-026: Oracle8i Network Administration The Oracle8i certification path is designed to lead you to the goal of becoming an
OCP in a gradual process There is no requirement to take the exams in the orderthey are intended so you do not need to take the exam for which this book preparesyou right away If you prefer to gain more experience and take another one of theexams first, this is acceptable The only requirement to become an Oracle CertifiedProfessional in the DBA track is that you pass all five exams, in no particular order.For each of the above exams, Oracle provides a set of objectives that you will be
tested on and required to be familiar with The objectives for the “Oracle8i:
Architecture and Administration” exam are listed in Appendix C, as well as a cross-reference of which chapters in this book provide information on that objec-
tive The complete set of objectives for the entire track may be found in the Oracle
Certified Professional Program Candidate Guide, Oracle8i Certified Database Administrator Track available on Oracle’s Web site at http://www.oracle.com/education/certification/index.html?ocpguides.html The exact link tothe Adobe Acrobat PDF file for the DBA track is: http://www.oracle.com/
education/downloads/dba8i_cg.pdf The Candidate Guide document should be reviewed to gain a full understanding ofthe Oracle Certified Professional Program, as well as how to schedule your examsfor your geographical area
Trang 10Preface
What’s In This Book?
This book is divided into six parts
✦ Part I — Overview of Oracle Architecture and Administration Like in most
things, it is always good to start at the beginning This first part of the bookdoes exactly that by introducing you to the architectural elements of Oracle
so that you have a better sense of what components make up an Oracledatabase and instance You will then find out what tools are available toadminister an Oracle database This part presents the 40,000-foot view ofOracle All of the information you are introduced here is explained in muchmore detail in the parts of the book that follow
✦ Part II — Creating and Administering an Oracle Instance and Database.
After receiving the 40,000-foot view of Oracle in Part I of this book, Part IItakes you to the next logical progression — creating a database and learningmore about what each of the database components is used for and how toadminister them You will be shown how an instance is configured andstarted, and the steps required to create a database from scratch This will befollowed by information on how to manage key Oracle database files includingthe control files, redo log files, and datafiles The emphasis of this part of thebook is on the administration of Oracle’s physical elements
✦ Part III — Administering Storage for Oracle Objects Knowing how to create
a database, tablespaces, and datafiles is only one part of administeringOracle You also need to be aware of issues surrounding the proper location ofvarious objects in Oracle that require storage (segments) This part of thebook, divided into five chapters that first introduce you to the different types
of segments in an Oracle database, then follows with a discussion on eachsegment’s particular storage needs, and finishes with a discussion on how toenforce data integrity in the database and the impact of constraints The focus
of this part of the book is the logical structure of the Oracle database and how
to ensure that the database is operating as efficiently as possible Eventhough a thorough discussion on performance tuning is beyond the scope ofthis book, Part III will provide hints on the efficient use of space for each seg-ment type
✦ Part IV — Managing Oracle Data During your career as a database
adminis-trator there will be times when you will need to load large amounts of datainto your database, move data from one database to another, or simply reor-ganize data in an existing database to improve performance and provide formore efficient storage The use of Import and Export utilities, and othermeans to reorganize the data in the database to ensure efficient data retrieval,and how to load data into an Oracle database using SQL*Loader are covered
in the two chapters that make up Part IV
✦ Part V — Administering Oracle Security This part of the book deals with
database security, from understanding how configure security profiles,
Trang 11x Oracle8i DBA: Architecture and Administration Certification Bible
creating and managing users, assigning permissions and the different types ofpermissions available, all the way to simplifying the administration of permis-sions using roles As a database administrator it will be your responsibility toensure that the database is not compromised and that only those individualswho need access have it
✦ Part VI — National Language Support Oracle introduced National Language
Support to make it easier to deploy databases that will be accessed by users
in multiple geographic areas simultaneously This feature allows national guage sorting, error message display, and much more The single chapter inthis part allows you to gain an understanding of how to use this ability to thebenefit of your users
lan-The book has been divided into these parts from the standpoint of organization andlogic and not to satisfy the exam requirements in a one-to-one mapping Each objec-tive of the exam is covered by material in the book Appendix C lists the examobjectives and the relevant section of the book where each is covered
The appendixes of the book provide a number of useful items:
✦ Appendix A outlines the programs and other information found on the
CD-ROM provided These include an electronic copy of the book in PDF mat, a sample exam with 300 or so questions that will help you to prepare towrite the real exam, and many other useful software programs
for-✦ Appendix B contains a sample exam with the same number of questions as
found in the actual Oracle exam The styles of questions in this appendix aredesigned to closely emulate the type of questions you can expect on the examand therefore help to prepare for it Answers to each question are also pro-vided, along with an explanation of why the correct answer is correct and theothers are incorrect
✦ Appendix C provides a mapping of the “Oracle8i: Architecture and
Administration” exam objectives to the chapters and sections where theseobjectives are covered in the book If you find that you are weak in a particu-lar area, this appendix will let you focus your study be pointing you to the cor-rect part of the book with the information you require
✦ Appendix D contains information on what to do to properly prepare for the
exam, and what some of the rules are
✦ Appendix E lists the objects used by the exercises at the end of each chapter,
as well as providing a hard copy of the scripts used to create and populate theobjects
✦ Appendix F recommends some other books, Web sites, and other resources
that may be useful in helping you prepare for the exam, as well as increaseyour knowledge of relational databases and Oracle
Trang 12Preface
How to Use This Book
When asked what the best place to start would be, a wise individual once said at the
beginning This same truth holds true here The parts and chapters of this book are
meant to build upon concepts presented in previous chapters Similarly, the labs ofeach chapter may also depend upon the results of labs in previous chapters Whilethis last point is not a hard and fast rule, it should be kept in mind The recom-mended practice is to read the book from beginning to end and absorb the material
in the order presented
Each chapter, as well, follows a consistent structure You are first presented with aseries of questions to test your knowledge of the material in the chapter This isuseful if you feel that you are quite familiar with the topics about to be presented —the Chapter Pre-Test questions allow you to verify that you have a good grasp ofthe information
Following the Chapter Pre-Test, the main body of the chapter is presented You will
be introduced to concepts and shown examples of code, as appropriate Feel free totry the code as you are reading the material to verify that you get the same results
as the author In some cases, the same steps may be followed in the labs at the end
of the chapter, so if the code does not work, check that section of the chapter
Each chapter ends with a Key Point Summary, designed to reinforce the main ments presented in the chapter, and then presents a series of exam-style questions
ele-to test your understanding of the material This is followed by one or morescenario-based questions to further test your understanding of the material Youare then asked to complete some Lab Exercises to provide you with some hands-onexperience in the material You are free to do the labs before answering the QuickAssessment exam-style questions
Answers for the Chapter Pre-Test, Quick Assessment, Scenarios, and Lab Exercisesare provided at the end of the chapter These are designed to allow you to confirmthe results of your work, and will provide additional information where necessary
After you have read each chapter, you should use the CD-based exam to further testyour knowledge When you feel that you are ready, you can then try your hand atthe Practice Exam in Appendix B If you feel that you have sufficient information, goahead and schedule your exam
The night before taking the exam, review each chapter’s Key Point Summary tomake sure you understand the material, and answer the Chapter Pre-Test questionsagain After passing the exam, the book can also make an excellent reference forany DBA, so keep it handy
Trang 13xii Oracle8i DBA: Architecture and Administration Certification Bible
Conventions Used in This Book
Whenever command syntax was presented it will appear similar to the following:
CREATE [GLOBAL TEMPORARY] TABLE [schema.]tablename(columnname datatype [NULL | NOT NULL] [DEFAULT expression]
✦ Any element that is a substitution variable for an object name in a code ple is presented in lowercase, such as the word “tablename” or “columnname”
exam-or “datatype” in the above example
✦ Any element that is an optional substitution variable for an object name ponent, or an object name, such as the word “schema” in the above example,will be all lowercase and enclosed in square brackets
com-✦ Any optional element of the command syntax will always be enclosed insquare brackets
✦ Any portion of the command syntax where mutually exclusive choices need to
be made, will separate those choices by a pipe symbol “|” An example of this
is the choice between NULL and NOT NULL in the above syntax
✦ Any element that can be repeated several times within the code syntax will berepresented by three dots ( )
✦ Any element that is underlined denotes the default option for the command
What the Icons Mean
Throughout the book, we’ve used icons in the left margin to call your attention to
points that are particularly important
The Objective icon indicates that the material being presented in the following
section directly maps to an objective on the “Oracle8i: Architecture and
Administration” exam
Note icons are used to tell you that something is important and perhaps a conceptthat may help you master the task at hand or something fundamental for under-standing subsequent material
Trang 14Preface
Tip icons indicate a more efficient way of doing something, or a technique that maynot be obvious
The Exam Tip icon is used to help you focus your studies more precisely
Throughout the book many topics are covered in more detail than necessary topass the exam The Exam Tip icon provides information on which elements youwill most likely be tested on
Caution icons are used when performing a certain operation incorrectly or in a ticular way can cause problems down the road
par-The Cross Reference icon is used to refer you to other sections of the same ter or other chapters that have more to say on a subject
chap-The In chap-The Real World icon is used to present information on how experiencedDBAs perform certain tasks and what really happens versus what Oracle may wantyou to think is happening This icon also may present an alternative method ofperforming a certain task
Trang 15Iwould like to acknowledge the hard work put in by my contributing authors
on this title It was a new experience to some of you but you all came through
it with flying colors This was greatly helped by the assistance of the entire Hungry Minds team, who pushed us when we needed to be pushed, but let us
do what we needed to do otherwise
Each of us would also like to acknowledge the contributions our families made tothis project Their understanding when would rather be with them, but needed towrite, helped make the process less painful They also know that the smoother theprocess was for us involved, the sooner we would be able to spend more time withthem To our wives, husbands, and children: we are always grateful for your sup-port and understanding, even if we don’t show it all the time
Finally, if you read the short snippets of information on the authors contributing
to this book, you will note that two out of three work for the same company: TMI-Learnix A special thank you goes out to Tim Mabey and Mia Hempey who notonly allowed me to grab some of their trainer’s free time and get them involved onthis project, but also actively encouraged it Working with you folks has alwaysbeen, and continues to be, a pleasure
Trang 16Contents at a Glance
Preface viii
Acknowledgments xiv
Part I: Overview of Oracle Architecture and Administration 1
Chapter 1: Oracle8i Architecture 3
Chapter 2: Getting Started with Oracle8i Server 35
Part II: Creating and Administering an Oracle Instance and Database 89
Chapter 3: Managing an Oracle Instance 91
Chapter 4: Creating a Database 139
Chapter 5: Creating Data Dictionary Views and Standard Packages 193
Chapter 6: Maintaining the Control File 253
Chapter 7: Maintaining Redo Log Files 273
Chapter 8: Managing Tablespaces and Datafiles 325
Part III: Administering Storage for Oracle Objects 387
Chapter 9: Storage Structure and Relationships 389
Chapter 10: Managing Rollback Segments 425
Chapter 11: Managing Tables 485
Chapter 12: Managing Indexes 579
Chatper 13: Maintaining Data Integrity 629
Part IV: Managing Oracle Data 683
Chapter 14: Loading Data 685
Chapter 15: Reorganizing Data 731
Part V: Managing Oracle Security 797
Chapter 16: Managing Password Security and Resources 799
Chapter 17: Managing Users 845
Chapter 18: Managing Privileges 891
Chapter 19: Managing Roles 973
Trang 17Part VI: National Language Support 1021
Chapter 20: Using National Language Support 1023
Appendix A: What’s on the CD-ROM 1065
Appendix B: Practice Exam 1071
Appendix C: Objective Mapping 1095
Appendix D: Exam Tips 1103
Appendix E: Database Schema for Labs 1107
Appendix F: Suggested Readings, Web Sites, and Other Resources 1125
Index 1129
End-User License Agreement 1168
Trang 18Preface viii
Acknowledgments xiv
Part I: Overview of Oracle Architecture and Administration 1 Chapter 1: Oracle8i Architecture 3
Oracle Architectural Overview 5
Oracle instance 7
Oracle database 18
Other key Oracle files 20
Processing SQL Statements 22
Connecting to an instance 22
Statement and transaction processing 24
Key Point Summary 26
Assessment Questions 28
Answers to Chapter Questions 30
Chapter Pre-Test 30
Assessment Questions 32
Chapter 2: Getting Started with Oracle8i Server 35
Oracle Universal Installer 37
Optimal Flexible Architecture (OFA) 42
Privileged Users 43
Authenticating privileged users 45
Oracle Tools for Administration 53
Interactive/command-line administration tools 53
Oracle Enterprise Manager 60
Other graphical administration tools 76
Key Point Summary 78
Assessment Questions 80
Scenarios 83
Lab Exercises 83
Answers to Chapter Questions 85
Chapter Pre-Test 85
Assessment Questions 86
Scenarios 88
Trang 19xviii Oracle8i DBA: Architecture and Administration Certification Bible
Part II: Creating and Administering an Oracle
Instance and Database 89
Chapter 3: Managing an Oracle Instance 91
Overview of Starting and Stopping an Oracle Instance 93
Parameter File (INIT.ORA) 94
Required INIT.ORA parameters 96
Other key INIT.ORA parameters 97
Storing saved configurations using Instance Manager 102
Starting Up and Shutting Down an Oracle Instance 103
Startup/shutdown stages 103
The STARTUP command 104
The SHUTDOWN command 108
Dynamic performance views 111
Managing Oracle Instance Settings 115
Displaying parameter values 115
Dynamically changing parameter values 116
Managing User Sessions 119
Managing the ALERT File and Trace Files 122
Key Point Summary 125
Assessment Questions 127
Scenarios 129
Lab Exercises 130
Answers to Chapter Questions 131
Chapter Pre-Test 131
Assessment Questions 132
Scenarios 134
Lab Exercises 135
Chapter 4: Creating a Database 139
Overview of Creating and Managing a Database 141
Creation Prerequisites 142
Operating system considerations 142
Permissions 144
Planning database file locations 144
Creating a Database 149 Using the Oracle Database Configuration Assistant 149
Creating a database manually using the CREATE DATABASE command 165
Troubleshooting Database Creation Problems 178
Key Point Summary 179
Trang 20Contents
Assessment Questions 182
Scenarios 185
Lab Exercises 185
Answers to Chapter Questions 186
Chapter Pre-Test 186
Assessment Questions 187
Scenarios 188
Lab Exercises 189
Chapter 5: Creating Data Dictionary Views and Standard Packages 193
Overview of Data Dictionary Views, Standard Packages, and Database Event Triggers 195
Data dictionary base tables and views 197
Uses of the Oracle data dictionary 199
Data Dictionary View Types 199
DBA_ Views 200
USER_ Views 202
ALL_ Views 204
Special data dictionary views 205
Dynamic performance views 206
Stored Program Units 209
Stored program unit types 209
Benefits of stored program units 210
Stored PL/SQL program units 211
Oracle data dictionary packages 228
View stored object information 230
Creating Data Dictionary Views 232
Scripts to create data dictionary views and packages 232
Other scripts and data dictionary objects 237
The Next Step 239
Key Point Summary 239
Assessment Questions 241
Scenarios 244
Lab Exercises 244
Answers to Chapter Questions 245
Chapter Pre-Test 245
Assessment Questions 246
Scenarios 248
Lab Exercises 248
Chapter 6: Maintaining the Control File 253
Overview of the Control File 255
Control File Contents 256
Creating the Control File 257
Trang 21xx Oracle8i DBA: Architecture and Administration Certification Bible
Protecting the Control File 258
Multiplexing the control file 259
Backing up the control file 260
Displaying Information about the Control File 261
Views using the control file 263
Key Point Summary 264
Assessment Questions 265
Scenarios 266
Lab Exercises 267
Answers to Chapter Questions 269
Chapter Pre-Test 269
Assessment Questions 270
Scenarios 270
Chapter 7: Maintaining Redo Log Files 273
Overview of the Online Redo Log Files 275
Planning Redo Log Files 277
Redo log file structure 277
Multiplexing redo log files 281
Using Online Redo Log Files 281
Log writer 282
Log switches 282
Checkpoints 283
Controlling log switches and checkpoints 283
Archiving Redo Log Files 287
NOARCHIVELOG mode 287
ARCHIVELOG mode 289
Maintaining Redo Log Files 291
Obtaining information about redo log files and archiving 291
V$LOGFILE 292
V$DATABASE 293
V$INSTANCE 294
ARCHIVE LOG LIST 294
Managing Redo Log Files 295
Adding online redo log groups 295
Adding online redo log members 296
Dropping online redo log groups 296
Dropping online redo log members 298
Moving or renaming online redo log files 299
Clearing online redo log files 300
Using Oracle Enterprise Manager 300
Troubleshooting LGWR Problems 300
Using LogMiner 302
How LogMiner Works 302
Finishing LogMiner sessions 305
Obtaining information about the LogMiner analysis 305
Features and restrictions of LogMiner 306
Key Point Summary 306
Assessment Questions 308
Trang 22Contents
Scenarios 312Lab Exercises 314Answers to Chapter Questions 317Chapter Pre-Test 317Assessment Questions 318Scenarios 320Lab Solutions 321
Chapter 8: Managing Tablespaces and Datafiles 325
The Oracle Database Storage Hierarchy 327Physical components 328Logical components 329Tablespaces 333Tablespace types 334Tablespace contents 336Creating tablespaces 339Maintaining tablespaces 345Getting information about tablespaces 359Guidelines for tablespaces 362Key Point Summary 363Assessment Questions 366Scenarios 368Lab Exercises 369Answers to Chapter Questions 372Chapter Pre-Test 372Assessment Questions 373Scenarios 375Lab Exercises 377
Part III: Administering Storage for Oracle Objects 387
Chapter 9: Storage Structure and Relationships 389
Overview of Logical Storage Structure Components 391Types of Segments 392Table 392Index 392Cluster 393Index-organized table 393Partitions 393Rollback segment 396Temporary segment 396LOB segment 397Nested table 397Bootstrap segment 397Storage Clause Precedence 398Extents 401Automatic and manual allocation of extents 401
Trang 23xxii Oracle8i DBA: Architecture and Administration Certification Bible
Block Space Utilization 402Database block contents 402Block space utilization parameters 404Getting Information about Database Storage Structures 406Planning the Location of Segments 409Key Point Summary 412Assessment Questions 414Scenarios 416Lab Exercises 417Answers to Chapter Questions 419Chapter Pre-Test 419Assessment Questions 420Scenarios 421Lab Exercises 422
Chapter 10: Managing Rollback Segments 425
The Use of Rollback Segments 427Purpose of Rollback Segments 430Transaction rollback 430Transaction recovery 431Read consistency 431Types of Rollback Segments 431SYSTEM rollback segment 432non-SYSTEM rollback segments 432DEFERRED rollback segments 433Rollback Segment Operations 433How transactions use rollback segments 433Growth of rollback segments 435Shrinkage of rollback segments 436Creating Rollback Segments 438Guidelines for creating rollback segments 439Creating rollback segments using OEM Storage Manager 442Getting Information about Rollback Segments 443DBA_ROLLBACK_SEGS 443V$ROLLNAME 445V$ROLLSTAT 445V$TRANSACTION 451Maintaining Rollback Segments 453Bringing rollback segments online 453Using OEM to bring rollback segments online 455Taking rollback segments offline 455Changing rollback segment storage parameters 459Changing rollback segment storage parameters using OEM 459Shrinking rollback segments 460Dropping rollback segments 462
Trang 24Contents
Troubleshooting Rollback Segments 463Insufficient space for transactions 463Read consistency error 464Blocking session 464Error in taking a tablespace offline 466Planning Rollback Segments 467Online transaction processing environments 467Data warehousing environments 468Key Point Summary 468Assessment Questions 470Scenarios 472Lab Exercises 473Answers to Chapter Questions 476Chapter Pre-Test 476Assessment Questions 477Scenarios 477Lab Solutions 478
Chapter 11: Managing Tables 485
Data Storage Basics 488Basic data storage structures 488Structure of a row 492Built-in Oracle datatypes 493Large object datatypes 498The ROWID and UROWID datatypes 499Collection types 502Creating Tables 506The CREATE TABLE syntax 507Creating tables using Oracle Schema Manager in OEM 514Temporary tables 514Creating tables on clusters 517Guidelines for creating tables 522Modifying Tables 530Altering storage parameters 530Manually allocating extents 532Moving tables 534Handling unused space 537Truncating tables 541Dropping a table 542Dropping a column 542Retrieving Table Information 545DBA_OBJECTS 545DBA_TABLES 546DBA_SEGMENTS 549DBA_EXTENTS 551DBA_TAB_COLUMNS 552DBMS_ROWID Package 553Key Point Summary 555
Trang 25xxiv Oracle8i DBA: Architecture and Administration Certification Bible
Assessment Questions 557Scenarios 561Lab Exercises 563Answers to Chapter Questions 567Chapter Pre-Test 567Assessment Questions 568Scenarios 570Lab Solutions 571
Chapter 12: Managing Indexes 579
Index Basics 581Logical elements of indexes 582Physical elements of indexes 585Types of Indexes 585B-tree indexes 585How indexes are used by SQL statements 587Effect of DML on indexes 587Bitmap indexes 593Comparing B-tree and bitmap indexes 596Creating B-Tree Indexes 597The CREATE INDEX command 597Creating indexes using OEM 601Modifying Indexes 604Altering storage parameters 604Allocating and deallocating index space 605Rebuilding indexes 605Rebuilding indexes online 607Coalescing indexes 608Dropping indexes 608Getting Information on Indexes 609Data dictionary views 609Getting index information using OEM 615Key Point Summary 616Assessment Questions 618Scenarios 620Lab Exercises 621Answers to Chapter Questions 622Chapter Pre-Test 622Assessment Questions 623Scenarios 624Lab Exercises 624
Chapter 13: Maintaining Data Integrity 629
Overview of Data Integrity in Oracle 631Integrity Constraints in Oracle 634Types of constraints 634Constraint states 642When are constraints checked? 647Special considerations for constraints 649
Trang 26Contents
Implementing Constraints 654Modifying Constraints 659Disabled novalidate 659Disabled validate 660Enabled novalidate 660Enabled validate 661Getting Constraint Information 663DBA_CONSTRAINTS 663DBA_CONS_COLUMNS 665Other helpful queries 666Key Point Summary 666Assessment Questions 669Scenarios 672Lab Exercises 673Answers to Chapter Questions 674Chapter Pre-Test 674Assessment Questions 676Scenarios 677Lab Exercises 678
Part IV: Managing Oracle Data 683
Chapter 14: Loading Data 685
Overview of Loading Data into Oracle Databases 687Loading Data Using Direct-Load INSERTs 688NOLOGGING option 690Parallel direct-load INSERTs 691Pros and cons of direct-load INSERTs 695Loading Data Using SQL*Loader 696Files used by SQL*Loader 697Invoking SQL*Loader from the command line 702Invoking SQL*Loader using Oracle Enterprise Manager 705Comparing conventional and direct-path loads 711Guidelines for Using SQL*Loader 714Troubleshooting SQL*Loader 715Key Point Summary 717Assessment Questions 719Scenarios 721Lab Exercises 722Answers to Chapter Questions 723Chapter Pre-Test 723Assessment Questions 724Scenarios 725Lab Exercises 726
Trang 27xxvi Oracle8i DBA: Architecture and Administration Certification Bible
Chapter 15: Reorganizing Data 731
Overview of Reorganizing Data 733Moving Data 735The create table as select (CTAS) method 735The alter table method 737The Import and Export utilities 738Export modes 738Moving data scenarios 743Export types 744Exporting Data Using the Export Utility 745Interactive mode 749Command Line mode 751Exporting using Oracle Enterprise Manager 753Importing Data Using the Import Utility 756Interactive mode 760Command Line mode 762Importing using Oracle Enterprise Manager 770Import behavior 772Export and import guidelines 775Transportable Tablespaces 776Implementing Transportable Tablespaces 777Transportable Tablespace uses and guidelines 779Checking for self-contained tablespaces 780Key Point Summary 782Assessment Questions 784Scenarios 787Lab Exercises 787Answers to Chapter Questions 789Chapter Pre-Test 789Assessment Questions 790Scenarios 790Lab Exercises 792
Part V: Managing Oracle Security 797
Chapter 16: Managing Password Security and Resources 799
Overview of Oracle Security 801Profiles 803Overview of profiles 804Profile settings 805Creating and managing profiles 813Key Point Summary 827Assessment Questions 828Scenario 832
Trang 28Contents
Lab Exercises 832Answers to Chapter Questions 834Chapter Pre-Test 834Assessment Questions 836Scenarios 837Lab Exercises 839
Chapter 17: Managing Users 845
Overview of User Management 847Users and schemas 847Guidelines for Creating Users 849Authentication mechanisms 849Quotas 850Tablespace assignment 852Other user creation guidelines 852Managing Users 853Creating users 853Modifying users 863Dropping users 866Getting Information about Users 869Key Point Summary 871Chapter Assessment 873Scenarios 876Lab Exercises 877Answers to Chapter Questions 879Chapter Pre-Test 879Assessment Questions 880Scenarios 881Lab Exercises 883
Chapter 18: Managing Privileges 891
Overview of Managing Privileges 893Types of Privileges 894System privileges 894Object privileges 914Auditing Privilege Usage 932Types of auditing 933Database auditing guidelines 934Implementing database auditing 936Getting information about auditing 946Key Point Summary 952Assessment Questions 954Scenarios 957Lab Exercises 958
Trang 29xxviii Oracle8i DBA: Architecture and Administration Certification Bible
Answers to Chapter Questions 959Chapter Pre-Test 959Assessment Questions 960Scenarios 962Lab Exercises 964
Chapter 19: Managing Roles 973
Overview and Benefits of Roles 975Characteristics of roles 975Benefits of roles 976Implementing and Using Roles 978Pre-defined roles in Oracle8i 978Creating roles 982Managing privileges with roles 986Modifying Roles 990Managing roles for users 991Querying role information in the data dictionary 999Guidelines for using roles 1003Key Point Summary 1005Assessment Questions 1006Scenario 1009Lab Exercise 1009Answers to Chapter Questions 1010Chapter Pre-Test 1010Assessment Questions 1011Scenario 1012Lab Exercise 1013
Part VI: National Language Support 1021
Chapter 20: Using National Language Support 1023
Overview of National Language Support (NLS) 1025Choosing a Character Set and National Language Character Set
for Your Database 1026Character sets and encoding schemes 1027Character sets and datatypes 1029Guidelines for choosing a character set and
NLS Character set 1030Specifying Language-Dependent Behavior in Oracle 1032INIT.ORA parameters for configuring NLS behavior 1032Using the NLS_LANG environment variable
to configure NLS settings 1035Changing NLS settings for a session 1036
Using NLS in Oracle8i 1038
Sorting 1038Using NLS parameters in SQL functions 1042Using Import/Export, SQL*Loader, and NLS 1044
Trang 30Contents
Getting Information about NLS Settings 1045Key Point Summary 1050Assessment Questions 1052Scenario 1055Lab Exercises 1056Answers to Chapter Questions 1057Chapter Pre-Test 1057Assessment Questions 1058Scenario 1059Lab Exercises 1060
Appendix A: What’s on the CD-ROM 1065 Appendix B: Practice Exam 1071 Appendix C: Objective Mapping 1095 Appendix D: Exam Tips 1103 Appendix E: Database Schema for Labs 1107 Appendix F: Suggested Readings, Web Sites,
and Other Resources 1125
Index 1129 End-User License Agreement 1168
Trang 32Overview of Oracle
Architecture and Administration
As is true with most things, it is always good to start at
the beginning This first part of the book does exactlythat by introducing you to the architectural elements ofOracle so that you have a better sense of what componentsmake up an Oracle database and instance You then find outwhat tools are available to administer an Oracle database
Chapter 1 provides a pretty comprehensive overview of thearchitectural components that make up Oracle You will learnwhat the difference between an Oracle database and anOracle instance is You will also find out what componentsmake up an Oracle instance from shared memory structures
to background processes You will then learn what is meant
by the term Oracle database and which files are part of a
database Then other key files will be presented, followed by adiscussion on how a SQL statement is processed and whatcomponents of Oracle are involved
Chapter 2 will deal more with administration and a lot lesswith architecture The different tools available to administer
an Oracle instance and database will first be introduced toyou This will be followed by a discussion on what a privi-leged user is and why this is so important in the administra-tion of Oracle You will also learn how to grant a user thenecessary permissions to be a privileged user and whichusers have them when a database is first created
As mentioned at the outset, this part presents the 40,000-footview of Oracle All of the information you are introduced here
is explained in much more detail in the parts of the book thatfollow
Trang 34Oracle8 i
Architecture
EXAM OBJECTIVES
✦ Oracle Architectural Components
• Describe the Oracle server architecture and its maincomponents
• List the structures involved in connecting a user to an Oracleinstance
• List the stages in processing queries, DML statements,COMMITS
1
C H A P T E R
✦ ✦ ✦ ✦
Trang 354 Part I ✦ Overview of Oracle Architecture and Administration
CHAPTER PRE-TEST
1.List the various components of the Oracle database
2.What does the term “Oracle instance” refer to?
3.How many required background processes are there in Oracle8i, what
are they, and what does each do?
4.Which optional background process is strongly recommended toensure good database recoverability and what does it do?
5.If a user issues a COMMIT command to end a transaction, what musttake place before the user is notified that the transaction has beencommitted?
6.Which Oracle file provides information on the configuration of theinstance and what naming convention does it follow?
7.On which computer does the user process typically reside? Howabout the server process?
8.Can more than one instance access data in a single Oracle database
at the same time?
9.What is stored in the shared pool?
10.Which Oracle database files are written to most often?
11.What are the three phases of processing an SQL statement?
✦ Answers to these questions can be found at the end of the chapter ✦
Trang 36Chapter 1 ✦ Oracle8i Architecture
The first phase of being able to pass the “Oracle8i: Architecture and
Administration” exam is to understand, at a relatively high level, how Oracleworks Just as a pilot needs to understand the basics of flight and how an airplane
is put together, a database administrator (DBA) of an Oracle database needs tounderstand what parts make up both the Oracle instance and the database, howthese are configured, and how client applications access the database to query andmodify data However, the pilot of an airplane is not the person who has all theanswers Where an aircraft mechanic has more knowledge about the inner workings
of the jet engine, for example, the database administrator does not necessarily need
to know intimate details about how the different components of Oracle work butdoes need to understand the interrelationships between them
The goal of this first chapter is to provide you with the basics of the Oracle tecture and how Oracle processes SQL statements This information is built uponthroughout the remainder of the book, so this is not to be a detailed discussion butmore of a 40,000-foot view
archi-Oracle Architectural Overview
Describe the Oracle server architecture and its main components
The whole point of a relational database management system (RDBMS) is to storeand supply data to clients who request it Each RDBMS does this in its own way, soknowing how one works does not necessarily mean that you can figure out the rest
Oracle, being one of the more sophisticated RDBMSs out there, allows for a greatdeal of flexibility in its configuration and operation Part of this is possibly due toits architectural design
The architecture of Oracle is configured in such a way as to ensure that clientrequests for data retrieval and modification are satisfied efficiently while maintain-ing database integrity The architecture also ensures that, should parts of the sys-tem become unavailable, mechanisms of the architecture can be used to recoverfrom such failure and, once again, bring the database to a consistent state, ensuringdatabase integrity Furthermore, the architecture of Oracle needs to provide thiscapability to many clients at the same time so performance is a consideration whenthe architecture is configured
In understanding the Oracle architecture and how it is used to process client requests,several terms need to be introduced Figure 1-1 displays a diagram of the architecturalcomponents that make up a typical Oracle configuration The terms shown in thediagram and briefly explained below deal with shared memory structures, processes,and datafiles that are used by Oracle The terms that you will read about in moredetail in this chapter and that are referred to throughout the book include:
Trang 376 Part I ✦ Overview of Oracle Architecture and Administration
Figure 1-1: Oracle’s architectural components include the instance, database,
and other files and processes
✦ Oracle Instance — The instance is a combination of a memory structure
shared by all clients accessing the data, and a number of backgroundprocesses that perform actions for the instance as a whole
The shared memory structure is called the SGA, which stands for SystemGlobal Area or Shared Global Area, depending on who you ask Either term isequally acceptable and the acronym SGA is the most common way to refer tothis memory structure
Oracle also includes a number of background processes that are started whenthe instance is started These include the database writer (DBW0), systemmonitor (SMON), process monitor (PMON), log writer (LGWR), and check-point process (CKPT) Depending on the configuration of your instance andyour requirements, others may also be started An example of this is thearchiver process (ARC0), which will be started if automatic archiving of logfiles is turned on
Database Buffer Cache Redo Log
Buffer
Data Files
Oracle Database
Shared Pool Data Dictionary Cache
Redo Log Files
Parameter File
Password file
Archived Redo Log Files
Server Processed
User Process PGA
Trang 38Chapter 1 ✦ Oracle8i Architecture
✦ Oracle Database — The database consists of three types of files Datafiles, of
which there can be many depending on the requirements of the database, areused to store the data that users query and modify The control file is a set ofone or more files that keeps information about the status of the database andthe data and log files that make it up The redo log files are used to store achronological record of changes to the data in the datafiles
More information is provided about the control file in Chapter 6 Chapter 7 providesadditional insight into redo log files, while datafiles are covered in more detail inChapter 8
✦ User Process — The user process is any application, either on the same
computer as the database or on another computer across a network that can
be used to query the database For example, one of the standard Oraclequery tools is SQL*Plus — a user process Another example of a user process
is Microsoft Excel or an Oracle Financials application Any application thatmakes use of the database to query and modify data in the database isconsidered a user process The user process does not have to come fromOracle Corporation; it only needs to make use of the Oracle database
✦ Server Process — The server process is a process launched when a user
process makes a connection to the instance The server process resides onthe same computer as the instance and database and performs all of the workthat the user process requests As you will find out in more detail later in thischapter, the server process receives requests from the user process in theform of SQL commands, checks their syntax, executes the statements andreturns the data to the user process In a typical Oracle configuration, eachuser process will have a corresponding server process on the Oracle server toperform all the work on its behalf
✦ Other Oracle Files — The remainder of the files that can be found on the hard
disk of the server computer include the Oracle parameter files (also known
as the INIT.ORA file), which has information on how the instance should beconfigured and how operations on the database will be performed/optimized,the password file, which is used to authenticate privileged users that can stopand start the instance, as well as perform other actions, and the archived redolog files, which are a copy of the redo log file that has been filled up Archivedredo log files exist to help the DBA ensure good recoverability of the
Trang 398 Part I ✦ Overview of Oracle Architecture and Administration
The instance is always associated with one, and only one, database This meansthat when an instance is started, the DB_NAME parameter in the Oracle parameter(INIT.ORA) file specifies which database the instance will be connected to, while theINSTANCE_NAME parameter (which defaults to the value of the DB_NAME parameter)specifies the name of the instance The configuration of the instance is always
performed through parameters specified in the INIT.ORA file and one environmentvariable — ORACLE_SID — which is used to determine which instance to start andperform configuration operations on when on the same server as the database
Figure 1-2: The Oracle instance is composed of a number of shared
memory areas and background processes
One of the main objectives of the instance is to ensure that connections by multipleusers to access database data are handled as efficiently as possible One way itaccomplishes this is by holding information in the datafiles in one of its sharedmemory structures — the database buffer cache — to allow multiple users readingthe same data to retrieve that data from memory instead of disk since access tomemory is about a thousand times quicker than access to a disk file
Another reason that the instance is important is that, when multiple users accessOracle data, allowing more than one to make changes to the same data can causedata corruption and cause the integrity of the data to become suspect Theinstance facilitates locking and the ability for several users to access data at thesame time
It is important to remember that a user process, when attempting to access data inthe database does not connect to the database but to the instance When specifyingwhat to connect to from a user process, you always specify the name of the instanceand not the name of the database The instance, in this way, is the gatekeeper tothe database It provides the interface to the database without allowing a user toactually touch the various files that make up the database
Database Buffer Cache Redo Log
Buffer
Shared Pool Data Dictionary Cache
Trang 40Chapter 1 ✦ Oracle8i Architecture
System Global Area (SGA)
The SGA is a shared memory structure that is accessed by all processes in order toperform database activity, such as read and write data, log changes to the log files,and keep track of frequently executed code and data dictionary objects The SGA isallocated memory from the operating system on which the instance is started, butthe memory that is allocated to it is managed by various Oracle processes The SGA
is composed of several specific memory structures, as shown in Figure 1-2 Theseinclude:
✦ Shared Pool — The Shared Pool is an area of SGA memory whose size is
specified by the INIT.ORA parameter SHARED_POOL_SIZE The default valuefor SHARED_POOL_SIZE is 3,000,000 bytes, or just under 3MB in versions ofOracle prior to 8.1.7, and 8,000KB bytes, or just under 8MB in Oracle 8.1.7
The size of the shared pool remains constant while the instance is runningand can only be changed by shutting down and restarting the instance, aftermodifying the value in the INIT.ORA file
For information on how to configure, start, and stop an Oracle instance, pleaserefer to Chapter 3
The shared pool is divided into two main areas of memory — the data dictionary
cache (also called the dictionary cache or row cache) and the library cache.
The data dictionary cache is used to store a cached copy of information onfrequently accessed data dictionary objects The information cached includesthe name of the object, permissions granted on the object, dependencyinformation, and so on The data dictionary cache also includes information
on the files that make up the database and what tablespaces they belong to,
as well as other important information
When a server process needs to determine what the name “Students” refers to,
it queries the data dictionary cache for that information and, if the informationcannot be found, it reads the information from the datafile where the datadictionary is located and then places it in a cache for others to read Theinformation in the cache is stored using a least-recently-used (or LRU)algorithm This means that information that is frequently requested remains inthe cache while information that is only occasionally required is brought intothe cache and flushed out if space is required to bring other information in
You cannot manually size the data dictionary cache — Oracle does thisdynamically and automatically If more memory is required to cache datadictionary information, which may be the case in a database with manyobjects, the cache is made larger to accommodate the requests If thememory is needed by the library cache component of the shared pool, somememory may be freed up and removed from the data dictionary cache
The other major component of the shared pool is the library cache Thelibrary cache is used to store frequently executed SQL statements and PL/SQLprogram units such as stored procedures and packages Storing the parsedstatement along with the execution plan for the commands sent to the server