Sybex OCA Oracle10g Administration 1 Study Guide 1Z0042 Dec 2004 ISBN 0782143679 pdf

  

OCA:

Oracle 10g Administration I

  

Study Guide

  

OCA:

Oracle 10g Administration I

  

Study Guide

Chip Dawes

Bob Bryla

  

Joseph C. Johnson

Matthew Weishan Associate Publisher: Neil Edde Acquisitions and Developmental Editor: Jeff Kellum Production Editor: Mae Lum Technical Editors: Christopher Guillaume, Robert Wahl Copyeditor: Pat Coleman Compositor: Craig Woods, Happenstance Type-O-Rama Graphic Illustrator: Jeffrey Wilson, Happenstance Type-O-Rama CD Coordinator: Dan Mummert CD Technician: Kevin Ly Proofreaders: James Brook, Sunah Cherwin, Amy Rasmussen, Nancy Riddiough Indexer: Jack Lewis Book Designers: Bill Gibson, Judy Fung Cover Designer: Archer Design Cover Photographer: Photodisc and Victor Arre

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No

part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but

not limited to photocopy, photograph, magnetic, or other record, without the prior agreement and written per-

mission of the publisher.

  Library of Congress Card Number: 2004094992

  ISBN: 0-7821-4367-9

SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries.

Screen reproductions produced with FullShot 99. FullShot 99 © 1991-1999 Inbit Incorporated. All rights reserved. FullShot is a trademark of Inbit Incorporated.

The CD interface was created using Macromedia Director, COPYRIGHT 1994, 1997-1999 Macromedia Inc. For more information on Macromedia and Macromedia Director, visit http://www.macromedia.com.

SYBEX is an independent entity from Oracle Corporation and is not affiliated with Oracle Corporation in any

manner. This publication may be used in assisting students to prepare for an Oracle Certified Associate exam.

Neither Oracle Corporation nor SYBEX warrants that use of this publication will ensure passing the relevant

exam. Oracle is either a registered trademark or a trademark of Oracle Corporation in the United States and/or other countries. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer.

The author and publisher have made their best efforts to prepare this book, and the content is based upon final

release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied

by software manufacturer(s). The author and the publisher make no representation or warranties of any kind

with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including

but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book. Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 To Our Valued Readers:

Thank you for looking to Sybex for your Oracle 10g exam prep needs. The OCA certification

is designed to validate knowledge of basic database administration tasks and an understand-

ing of the Oracle database architecture and how its components work and interact with one

another. The OCA is also a prerequisite to becoming an OCP.

We at Sybex are proud of the reputation we’ve established for providing Oracle certification

candidates with the practical knowledge and skills needed to succeed in the highly competitive

  

IT marketplace. It has always been Sybex’s mission to teach individuals how to utilize tech-

nologies in the real world, not to simply feed them answers to test questions. Just as Oracle

is committed to establishing measurable standards for certifying database professionals,

Sybex is committed to providing those professionals with the means of acquiring the skills and

knowledge they need to meet those standards.

As always, your feedback is important to us. If you believe you’ve identified an error in the

book, please send a detailed e-mail to support@sybex.com. And if you have general comments

or suggestions, feel free to drop me a line directly at nedde@sybex.com. At Sybex, we’re con-

tinually striving to meet the needs of individuals preparing for certification exams.

  Good luck in pursuit of your Oracle certification! Neil Edde Associate Publisher—Certification Sybex, Inc.

  Software License Agreement: Terms and Conditions The media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files (the “Software”) to be used in connection with the book. SYBEX hereby grants to you a license to use the Software, subject to the terms that follow. Your purchase, acceptance, or use of the Soft- ware will constitute your acceptance of such terms. The Software compilation is the property of SYBEX unless otherwise indicated and is protected by copyright to SYBEX or other copyright owner(s) as indicated in the media files (the “Owner(s)”). You are hereby granted a single-user license to use the Software for your personal, noncommercial use only. You may not repro- duce, sell, distribute, publish, circulate, or commercially exploit the Software, or any portion thereof, without the written consent of SYBEX and the specific copyright owner(s) of any component software included on this media. In the event that the Software or components include specific license requirements or end-user agreements, statements of condition, disclaimers, limitations or war- ranties (“End-User License”), those End-User Licenses supersede the terms and conditions herein as to that par- ticular Software component. Your purchase, accep- tance, or use of the Software will constitute your acceptance of such End-User Licenses. By purchase, use or acceptance of the Software you fur- ther agree to comply with all export laws and regula- tions of the United States as such laws and regulations may exist from time to time.

  Software Support Components of the supplemental Software and any offers associated with them may be supported by the specific Owner(s) of that material, but they are not sup- ported by SYBEX. Information regarding any available support may be obtained from the Owner(s) using the information provided in the appropriate read.me files or listed elsewhere on the media. Should the manufacturer(s) or other Owner(s) cease to offer support or decline to honor any offer, SYBEX bears no responsibility. This notice concerning support for the Software is provided for your information only.

  SYBEX is not the agent or principal of the Owner(s), and SYBEX is in no way responsible for providing any support for the Software, nor is it liable or responsible for any support provided, or not provided, by the Owner(s).

  Warranty SYBEX warrants the enclosed media to be free of phys- ical defects for a period of ninety (90) days after pur- chase. The Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com. If you discover a defect in the media during this warranty period, you may obtain a replace- ment of identical format at no charge by sending the defective media, postage prepaid, with proof of pur- chase to: SYBEX Inc.

  Product Support Department 1151 Marina Village Parkway Alameda, CA 94501 Web: http://www.sybex.com After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of purchase, and a check or money order for $10, payable to SYBEX.

  Disclaimer SYBEX makes no warranty or representation, either expressed or implied, with respect to the Software or its contents, quality, performance, merchantability, or fit- ness for a particular purpose. In no event will SYBEX, its distributors, or dealers be liable to you or any other party for direct, indirect, special, incidental, consequen- tial, or other damages arising out of the use of or inabil- ity to use the Software or its contents even if advised of the possibility of such damage. In the event that the Soft- ware includes an online update feature, SYBEX further disclaims any obligation to provide this feature for any specific duration other than the initial posting.

  The exclusion of implied warranties is not permitted by some states. Therefore, the above exclusion may not apply to you. This warranty provides you with specific legal rights; there may be other rights that you may have that vary from state to state. The pricing of the book with the Software by SYBEX reflects the allocation of risk and limitations on liability contained in this agree- ment of Terms and Conditions.

  Shareware Distribution This Software may contain various programs that are distributed as shareware. Copyright laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights. If you try a share- ware program and continue using it, you are expected to register it. Individual programs differ on details of trial periods, registration, and payment. Please observe the requirements stated in appropriate files.

  Copy Protection The Software in whole or in part may or may not be copy-protected or encrypted. However, in all cases, reselling or redistributing these files without authoriza- tion is expressly forbidden except as specifically pro- vided for by the Owner(s) therein.

  

To my children Zachary and Charlie, you bring joy to my life. —Chip Dawes

To my three wonderful daughters: Rachel, Laura, and Alyssa —Matthew Weishan To Brenda and Emily —Joseph C. Johnson To Mary Christine and the kids —Bob Bryla Acknowledgments

  We would like to thank Oracle for producing the great database software that this book is about, as well as the Sybex team who did all the behind-the-scenes work on the book. We, the authors, get our names on the cover of the book, but the following people helped significantly in creating this Study Guide, and we want to thank and acknowledge their efforts: acquisitions and developmental editor Jeff Kellum; production editor Mae Lum; copyeditor Pat Coleman; technical editors Chris Guillaume and Bob Wahl; compositor Craig Woods of Happenstance Type-O-Rama; illustrator Jeffrey Wilson of Happenstance Type-O-Rama; proofreaders James Brook, Sunah Cherwin, Amy Rasmussen, and Nancy Riddiough; indexer Jack Lewis; and all the other unnamed individuals who had a hand in bringing this book to fruition.

  I’d like to thank the good software engineers at Oracle for developing and continuing to improve a great software product. I’ve spent many good years learning about and teaching others to use Oracle databases, and I still have so much more to learn.

  Lastly and most importantly, I’d like to thank my family for the unceasing support I get from them. —Chip Dawes

  I’d like to thank all the contributors to this book for their time and efforts. I’d also like to thank the entire Sybex team for their input and assistance in the production of this work. The third time has been a charm. —Matthew Weishan

  Many thanks to all those who helped me during the development of this book, in particular: Tony Gastel, Gerry Bustamente, Stephen Deutsch, Brook Swenson, Tami Van Dreese, Jamie Mudrick, Brenda, and Emily. Thanks too to my co-authors Chip, Bob, and Matt.

  —Joseph C. Johnson This book wouldn’t be possible without the love and support from my family throughout the long nights and weekends when I still managed to find time to help the kids with their home- work before bedtime. I loved every minute of it.

  Thanks also to my professional colleagues, both past and present, who provided me with inspiration, support, and guidance and who pushed me a little further to take a risk now and then, starting with that math teacher in high school, whose name eludes me at the moment, who introduced me to computers on a DEC PDP-8 with a teletype and a paper tape reader.

  —Bob Bryla Contents at a Glance Introduction xvii Assessment Test xxx

  Chapter

  1 Oracle Database 10g Components and Architecture

  1 Creating and Controlling a Database

  75 Chapter

  2 Chapter

  3 Database Storage and Schema Objects 135

  Oracle Net Services 185

  Chapter

  4 Chapter

  5 Oracle Shared Server 269

  User Administration and Security 309

  Chapter

  6 Chapter

  7 Managing Data With SQL, PL/SQL, and Utilities 357

  Managing Consistency and Concurrency 401

  Chapter

  8 Chapter

  9 Proactive Database Maintenance and

  Performance Monitoring 431

  Chapter

  10 Implementing Database Backups 499

  Implementing Database Recovery 543

  Chapter

  11 Glossary

  587

  Index 605

  Contents Introduction xvii Assessment Test xxx

  68 Answers to Review Questions

  48 Review the Documentation

  48 Review the System Requirements

  48 Plan Your Install

  49 Using the Oracle Universal Installer

  56 Summary 65 Exam Essentials

  66 Review Questions

  72 Chapter

  28 The Oracle Database

  2 Creating and Controlling a Database

  75 The Oracle Enterprise Management Framework

  76 Starting and Stopping the Oracle Management Agent

  78 Accessing a Database Using the Database Control

  80 Using iSQL*Plus 80 Using the Oracle Database Configuration Assistant

  84 Creating an Oracle Database Using the DBCA

  38 Installing Oracle 10 g

  26 The Oracle Instance

  Chapter

  5 Oracle Collaboration Suite

  1 Oracle Database 10g Components and Architecture

  1 The Oracle Product Family

  2 Oracle 10 g

  3 Oracle Application Server 10 g

  4 Oracle Developer Suite

  4 Oracle Applications 11 i

  5 Oracle Services

  25 User Processes

  5 Relational Database Concepts

  6 Rows, Columns, Tables, and Databases

  7 Relationships and Constraints

  11 Other Segment Types

  17 Interacting with Segments

  19 The Oracle Architecture

  84 Configuring an Oracle Database Using DBCA 106 Contents Starting Up and Shutting Down an Oracle Database 111

  Oracle 10 g Database Startup 111 Shutting Down an Oracle 10 g Database 117 Shutting Down Oracle Using EM Database Control 118 Shutting Down Oracle Using SQL*Plus 122 Monitoring the Database Alert Log 122

  Summary 125 Exam Essentials

  127 Review Questions 129 Answers to Review Questions 133

  Chapter

  3 Database Storage and Schema Objects 135 Identifying Segments, Extents, and Data Blocks 136 Managing Tablespaces 136

  Identifying Default Tablespaces 137 Creating and Maintaining Tablespaces 138 Obtaining Tablespace Information 145

  Managing Datafiles 151 Working with Schema Objects 152

  Specifying Datatypes 152 Creating Tables 158 Working with Constraints 165 Working with Indexes 172 Working with Views 174 Working with Sequences 175

  Summary 176 Exam Essentials

  176 Review Questions 178 Answers to Review Questions 182

  Chapter

  4 Oracle Net Services 185 Network Design Considerations 186

  Network Complexity Issues 186 Network Security Issues 187 Interfacing Existing Systems with New Systems 188 Network Responsibilities for the DBA 188

  Network Configurations 189 Single-Tier Architecture 189 Two-Tier Architecture 190

  N-Tier Architecture 190

  An Overview of Oracle Net Features 191 Connectivity 192

  Contents Security 196 Accessibility 197

  Configuring Oracle Net on the Server 198 Understanding the Oracle Listener 199 Managing Oracle Listeners 203 Dynamically Registering Services 224 Additional Configurations When Using Multiple Listeners 225 Troubleshooting Server-Side Connection Problems 227 Oracle Net Logging and Tracing on the Server 233

  Configuring Oracle Net for the Client 238 Client-Side Names Resolution Options 238 The Hostnaming Method 239 The Oracle Easy Connect Naming Method 244 The Localnaming Method 246 Troubleshooting Client-Side Connection Problems 254

  Summary 259 Exam Essentials

  260 Review Questions 263 Answers to Review Questions 267

  Chapter

  5 Oracle Shared Server 269 An Overview of Oracle Shared Server 270

  Dedicated Server versus Shared Server 271 Advantages and Disadvantages of Shared Server 273

  Oracle Shared Server Infrastructure 274 PGA and SGA Changes When Using Oracle

  Shared Server 274 The Role of the Listener in an Oracle Shared

  Server Environment 276 Configuring the Oracle Shared Server 276

  Defining the Shared Server Parameters 277 Configuring Shared Server at Database Creation 283 Configuring Shared Server Using Enterprise Manager 285

  Managing Shared Server 288 Displaying Information about Shared Server

  Connections Using the Listener Utility 288 Using Dynamic Performance Views for Shared Server 289 Requesting a Dedicated Connection in a

  Shared Server Environment 294 Tuning the Shared Server Option 295

  Configuring the Large Pool 296 Sizing the Large Pool 296 Contents Summary 300 Exam Essentials

  301 Review Questions 302 Answers to Review Questions 306

  Chapter

  6 User Administration and Security 309 Creating and Managing User Accounts 310

  Configuring Authentication 310 Assigning a Default Tablespace 312 Assigning a Temporary Tablespace 312 Assigning a Profile to a User 313 Removing a User from the Database 314

  Granting and Revoking Privileges 314 Granting Object Privileges 314 Granting System Privileges 318 Role Privileges 324

  Controlling Resource Usage by Users 327 Assigning Tablespace Quotas 328 Assigning Resource Limits with a Profile 328

  Applying the Principle of Least Privilege 331 Managing Default User Accounts 333 Implementing Standard Password Security Features 334 Auditing Database Activity 336

  Managing Statement Auditing 338 Managing Privilege Auditing 343 Managing Object Auditing 344 Purging the Audit Trail 345 Managing Fine-Grained Auditing 346

  Summary 349 Exam Essentials

  349 Review Questions 351 Answers to Review Questions 355

  Chapter

  7 Managing Data with SQL, PL/SQL, and Utilities 357 Manipulating Data through SQL 358

  Using

  INSERT Statements 358

  Using UPDATE Statements 361 Using DELETE Statements 362

  Identifying PL/SQL Objects 363 Working with Functions 363 Working with Procedures 365 Working with Packages 365

  Contents Configuring PL/SQL for Better Performance 373 Creating Directory Objects 374 Data Pump Overview 374

  Summary 422 Exam Essentials

  Summary 489 Exam Essentials

  Performance Monitoring 471 Sources of Tuning Information 471 Storing Database Statistics in the Data Dictionary 480 Important Performance Metrics 485

  Automatic Workload Repository 432 Automatic Database Diagnostic Monitoring 435 ADDM Diagnostic Advisors 445 ADDM Alerts 463

  9 Proactive Database Maintenance and Performance Monitoring 431 Proactive Database Maintenance 432

  Chapter

  423 Review Questions 424 Answers to Review Questions 429

  Monitoring Locking and Resolving Lock Conflicts 416 Understanding Locks and Transactions 416 Maximizing Data Concurrency 417 Detecting and Resolving Lock Conflicts 419

  Using Data Pump to Export Data 375 Using Data Pump to Import Data 381 Monitoring the Progress of a Data Pump Job 388

  Understanding Undo Segments 403 Using Undo Data 405 Monitoring, Configuring, and Administering Undo 407

  8 Managing Consistency and Concurrency 401 Leveraging Undo Management 402

  Chapter

  394 Review Questions 395 Answers to Review Questions 399

  Summary 393 Exam Essentials

  Loading Data with SQL*Loader 388 Specifying SQL*Loader Command-Line Parameters 389 Specifying Control File Options 390

  491 Review Questions 492 Contents Chapter

  10 Implementing Database Backups 499 Understanding and Configuring Recovery Components 501

  Control Files 501 Understanding Checkpoints 505 Redo Log Files 506 Archived Redo Log Files 514 The Flash Recovery Area 518

  Performing Backups 521 Understanding Backup Terminology 521 Backing Up the Control File 522 Using RMAN to Create Backups 525

  Managing Backups 530 Catalog Maintenance 530 Monitoring the Flash Recovery Area 531 Automating Backups 532

  Summary 534 Exam Essentials

  534 Review Questions 536 Answers to Review Questions 540

  Chapter

  11 Implementing Database Recovery 543 Understanding Database Failure Types 544

  Statement Failures 545 User Process Failures 545 Network Failures 546 User Error Failures 546 Instance Failures 547 Media Failures 547

  Performing Recovery Operations 548 Understanding Instance Startup 548 Keeping an Instance from Failing 550 Recovering from Instance Failure 550 Tuning Instance Recovery 551 Recovering from User Errors 552 Recovering from Loss of a Control File 564 Recovering from Loss of a Redo Log File 566 Recovering from Loss of a System-Critical Datafile 569 Recovering from Loss of a Non–System-Critical Datafile 573

  Summary 578 Exam Essentials

  578 Review Questions 580 Introduction

  There is high demand for professionals in the information technology (IT) industry, and Oracle certifications are the hottest credentials in the database world. You have made the right decision to pursue your Oracle certification, because achieving it will give you a distinct advantage in this highly competitive market.

  Most of you should already be familiar with Oracle and need no introduction to the Oracle database world. Here’s some information for those who aren’t. Oracle, founded in 1977, sold the first commercial relational database and is now the world’s leading database company and second-largest independent software company, with revenues of more than $10 billion, serving more than 145 countries.

  Oracle databases are the de facto standard for large Internet sites, and Oracle advertisers are boastful but honest when they proclaim, “The Internet Runs on Oracle.” Almost all big Internet sites run Oracle databases. Oracle’s penetration of the database market runs deep and is not limited to dot-com implementations. Enterprise resource planning (ERP) application suites, data warehouses, and custom applications at many companies rely on Oracle. The demand for DBA resources remains higher than others during weak economic times.

  This book is intended to help you pass the Oracle Database 10

  g: Administration I exam,

  which will establish your credentials as an Oracle Database Administrator. The OCA certifica- tion is a prerequisite to obtaining the more comprehensive Oracle Certified Professional (OCP) certification and is the first step toward obtaining an Oracle Certified Master (OCM) certifica- tion. Using this book and a practice database, you can acquire the necessary skills to pass the

  1Z0-042 Oracle Database 10 g: Administration I exam.

  Why Become Oracle Certified?

  The number one reason to become an OCA or OCP is to gain more visibility and greater access to the industry’s most challenging opportunities. Oracle certification is the best way to demon- strate your knowledge and skills in Oracle database systems.

  Certification is proof of your knowledge and shows that you have the skills required to support Oracle core products. The Oracle certification program can help a company identify proven performers who have demonstrated their skills and who can support the company’s investment in Oracle technology. It demonstrates that you have a solid understanding of your job role and the Oracle products used in that role.

  OCPs are among the best paid in the IT industry. Salary surveys consistently show the OCP certification to yield higher salaries than other certifications, including Microsoft, Novell, and Cisco.

  So whether you are beginning your career, changing your career, or looking to secure your position as a DBA, this book is for you!

  Introduction

  Oracle Certifications

  Oracle certifications follow a track that is oriented toward a job role. There are database admin- istration, application developer, and web application server administrator tracks. Within each track, Oracle has a multitiered certification program.

  Within the administration track, there are three tiers: The first tier is the Oracle 10 g Certified Associate (OCA). To obtain OCA certification, you must pass the 1Z0-042 Oracle Database 10

  g: Administration I exam in a proctored setting.

  The second tier is the Oracle 10 g Certified Professional (OCP), which builds on and requires OCA certification. To obtain OCP certification, you must attend an approved Oracle University hands-on class and pass the 1Z0-043 Oracle Database 10

  g: Administra- tion II exam in a proctored setting.

  The third and highest tier is the Oracle 10 g Certified Master (OCM), which builds on and requires OCP certification. To obtain OCM certification, you must attend advanced-level classes and take a two-day, hands-on practical exam. The material in this book addresses only the Administration I exam. Other Sybex books— which can be found at www.sybex.com—can help students new to the DBA world prepare for the OCP exam Oracle Database 10

g: Administration II exam (1Z0-043). You can also get infor-

  mation on the Oracle upgrade exam, the Oracle Database 10

  g: New Features for Administra- tors exam (1Z0-040).

  See the Oracle website at www.oracle.com/education/certification for the latest information on all of Oracle’s certification paths along with Oracle’s train- ing resources.

  Oracle DBA Certification

  The role of the 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, cre- ate, maintain, and ensure that the database is available for the business. They are always watching the database for performance issues and to prevent unscheduled downtime. The DBA’s job requires broad understanding of the architecture of Oracle database and expertise in solving problems.

  Because this book focuses on the DBA track, we will take a closer look at the tiers of the DBA track.

  Oracle Database 10g Administrator Certified Associate

  The Oracle 10 g Administrator Certified Associate (OCA) certification is a streamlined, entry- level certification for the database administration track and is required to advance toward the more senior certification tiers. This certification requires you to pass one exam that demon- strates your knowledge of Oracle basics:

  Introduction

  Oracle Database 10g Administrator Certified Professional

  The OCP tier of the database administration track challenges you to demonstrate your enhanced experience and knowledge of Oracle technologies. The Oracle 10 g Administrator Certified Pro- fessional (OCP) certification requires achievement of the OCA certification, attendance at one or more approved Oracle University classes, and successful completion of the following exam:

  1Z0-043 Oracle Database 10

g: Administration II

  g: Administration I

  Verify this list against the Oracle education website (www.oracle.com/ education ) as it can change without any notice.

  g: New Features for Oracle8i OCP exam.

  An Oracle8 i OCP can upgrade directly to 10g by passing the 1Z0-045 Oracle Data– base 10

  g: New Features for Administrators exam.

  Existing Oracle professionals can upgrade their certification in several ways: An Oracle9 i OCP can upgrade to 10g certification by passing the 1Z0-040 Oracle Data- base 10

  Oracle 10g Upgrade Paths

  More details on the required coursework will be available in late 2004.

  The Oracle Database 10 g Administration Certified Master (OCM) is the highest level of certi- fication that Oracle offers. To become a certified master, you must first obtain OCP certifica- tion, then complete advanced-level classes at an Oracle Education facility, and finally pass a hands-on, two-day exam at an Oracle Education facility. The classes and practicum exam are offered only at an Oracle Education facility and may require travel.

  Oracle Database 10g Certified Master

  g.

  Oracle Database 10

  If you already have your OCP in 9 i or earlier and have elected to take the upgrade path, you are not required to take the Oracle University class to obtain your OCP for Oracle 10

  The approved courses for OCP candidates include the following: Oracle Database 10

  Oracle Database 10

  g: New Features for Administrators

  Oracle Database 10

  g: Introduction to SQL

  Oracle Database 10

  g: Administration II

  g: Program with PL/SQL Introduction

  Oracle Database 10g Administrator Special Accreditations

  New to the Oracle certification program are the Oracle Database 10 g Administrator Special Accreditation programs. These accreditations formally recognize the specialized knowledge of OCPs in particular database administration areas such as high availability, security, and 10 g Grid Control. OCPs who pass one of these special accreditation exams receive a certificate that formally recognizes their special competency.

  Oracle Database 10g DBA Assessment

  Oracle also provides an optional (and free) prerequisite to all the proctored exams, which is the Oracle Database 10g DBA Assessment online exam:

  1Z0-041 Oracle Database 10g: DBA Assessment

This exam evaluates your proficiency with basic administration and management of an Oracle 10g

database, and upon passing this online exam, you receive a certificate of completion from Oracle

University. Although anybody can take this exam, it is designed for those new to Oracle and is an

excellent measurement of how familiar you are with the new Oracle 10g database.

  Oracle Exam Requirements

  The Oracle Database 10

g: Administration I exam covers several core subject areas. As with

  many typical multiple-choice exams, you can take advantage of several tips to maximize your score on the exam.

  Skills Required for the Oracle Database 10g: Administration I Exam

  To pass the Oracle 10 g Administration I exam, you need to master the following subject areas in Oracle 10

  g: Installing Oracle Database 10g Software Identify system requirements.

  Use Optimal Flexible Architecture (OFA). Install software with Oracle Universal Installer. Identify and configure commonly used environment variables.

  Introduction

  Creating an Oracle Database Explain the Oracle database architecture.

  Explain the instance architecture. Use the management framework. Use DBCA (Database Configuration Assistant) to create a database. Use DBCA to configure a database. Use DBCA to drop (or delete) a database. Use DBCA to manage templates.

  Database Interfaces Use SQL*Plus and iSQL*Plus to access an Oracle 10g database.

  Use SQL*Plus and iSQL*Plus to describe the logical structure of tables. Use SQL to query, manipulate, and define data using SELECT, UPDATE/INSERT/DELETE, and CREATE/ALTER/DROP statements.

  Identify common database interfaces. Describe a database transaction.

  Controlling the Database Start and stop iSQL*Plus.

  Start and stop Enterprise Manager (EM) Database Control. Start and stop the Oracle Listener. Start up and shut down Oracle Database 10 g. Describe startup and shutdown options for Oracle Database 10 g. Handle parameter files. Locate and view the Database alert log.

  Storage Structures Define the purpose of tablespaces and datafiles.

  Create tablespaces. Manage tablespaces (alter, drop, generate DDL, take offline, put on line, add data files, make read-only/read-write).

  Obtain tablespace information from EM and the data dictionary views. Drop tablespaces. Describe the default tablespaces.

  Introduction

  Administering Users Create and manage database user accounts.

  Create and manage roles. Grant and revoke privileges. Control resource usage by users.

  Managing Schema Objects Create and modify tables.

  Define constraints. View the attributes of a table. View the contents of a table. Create indexes and views. Name database objects. Select appropriate datatypes. Create and use sequences.

  Managing Data Manipulate data through SQL using INSERT, UPDATE, and DELETE.

  Use Data Pump to export data. Use Data Pump to import data. Load data with SQL*Loader. Create directory objects.

  PL/SQL Identify PL/SQL (Procedural Language SQL) objects.

  Describe triggers and triggering events. Identify configuration options that affect PL/SQL performance.

  Oracle Database Security Apply the principle of least privilege.

  Manage default user accounts. Implement standard password security features. Audit database activity. Register for security updates.

  Introduction

  Oracle Net Services Use Database Control to create additional listeners.

  Use Database Control to create Oracle Net service aliases. Use Database Control to configure connect time failover. Use Listener features. Use the Oracle Net Manager to configure client and middle-tier connections. Use TNSPING to test Oracle Net connectivity. Describe Oracle Net Services. Describe Oracle Net names resolution methods.

  Oracle Shared Servers Identify when to use Oracle Shared Servers.

  Configure Oracle Shared Servers. Monitor Shared Servers. Describe the Shared Server architecture.

  Performance Monitoring Troubleshoot invalid and unusable objects.

  Gather optimizer statistics. View performance metrics. React to performance issues.

  Proactive Maintenance Set warning and critical alert thresholds.

  Collect and use baseline metrics. Use tuning and diagnostic advisors. Use the Automatic Database Diagnostic Monitor (ADDM). Manage the Automatic Workload Repository. Describe server-generated alerts.

  Undo Management Monitor and administer undo.

  Configure undo retention. Guarantee undo retention. Use the Undo Advisor. Describe the relationship between undo and transactions. Size the undo tablespace.

  Introduction

  Monitoring and Resolving Lock Conflicts Detect and resolve lock conflicts.

  Manage deadlocks. Describe the relationship between transactions and locks. Explain lock modes within Oracle Database 10 g.

  Backup and Recovery Concepts Describe the basics of database backup, restore, and recovery.

  Describe the types of failure that can occur in an Oracle 10 g database. Describe ways to tune instance recovery. Identify the importance of checkpoints, redo log files, and archived log files. Configure ARCHIVELOG mode. Configure a database for recoverability.

  Database Backups Create consistent database backups.

  Back up your database without shutting it down. Create incremental backups. Automate database backups. Monitor the Flash Recovery area. Describe the difference between image copies and backup sets. Describe the different types of database backups. Back up a control file to trace. Manage backups.

  Database Recovery Recover from loss of a control file.

  Recover from loss of a redo log file. Recover from loss of a system-critical datafile. Recover from loss of a non–system-critical datafile.

  Tips for Taking the OCA Exam

  Use the following tips to help you prepare for and pass the exam: The exam contains about 55–80 questions to be completed in 90 minutes. Answer the ques- tions you know first so that you do not run out of time.

  At first glance, the answer choices to many questions look identical. Read the questions

  Introduction Some questions are scenario-based. Some scenarios contain nonessential information and exhibits. You need to be able to identify what’s important and what’s not important. Do not leave any questions unanswered. There is no negative scoring. After selecting an answer, you can mark a difficult question or one that you’re unsure of 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. If you’re not sure of your answer, mark it for review, and then look for other questions that might help you eliminate any incorrect answers. At the end of the test, you can go back and review the questions that you marked for review.

  Be familiar with the exam objectives, which are included in the front of this book as a perforated tear-out card. You can also find them at www.oracle.com/ education/certification/objectives/42.html . In addition, if you would like information on recommended classes and passing scores, visit www.oracle.com/ education/certification/news/beta_042.html .

  Where Do You Take the Certification Exam?

  The Oracle Database 10 g certification exams are available at any of the more than 900 Thom- son Prometric Authorized Testing Centers around the world. For the location of a testing center near you, call 1-800-891-3926. Outside the United States and Canada, contact your local Thomson Prometric Registration Center.

  To register for a proctored Oracle Certified Associate exam: Determine the number of the exam you want to take. For the OCA exam, it is 1Z0-042.

  Register with Thomson Prometric online at www.prometric.com or, in North America, by calling 1-800-891-EXAM (800-891-3926). 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.

  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. You can schedule exams up to six weeks in advance or as soon as one working day before the day you want to take it. If something comes up and you need to cancel or reschedule your exam appointment, contact Thomson Prometric at least 24 hours or one business day in advance.

  Introduction

  What Does This Book Cover? This book covers everything you need to pass the Oracle Database10 g Administration I exam.

  Each chapter begins with a list of exam objectives.

  Chapter 1 Discusses some of the first activities you will need to perform. You will learn how

  to install the Oracle database software, about the architecture of both an Oracle database and instance, and how to use some common database interfaces as well as how to use SQL to define, manipulate, and access data in your database.

  Chapter 2 Discusses creating and controlling the Oracle database environment. You will learn how to start and stop the database, EM Database Control, and iSQL*Plus. Chapter 3 Discusses storage structures and schema objects. You will learn how to create

  and manage physical database structures such as tablespaces, datafiles, segments, extents, and blocks. You will also learn about logical database structures such as tables, indexes, views, and sequences.

  Chapter 4 Discusses Oracle Net services. You will learn how to create and control database listeners, Net service names, and connect time failover. Chapter 5 Discusses Oracle Shared Servers. You will learn about the Shared Server architec- ture, when to use Shared Servers, and how to configure and monitor Shared Servers. Chapter 6 Discusses administering users and database security. You will learn how to create and manage user accounts, roles, privileges, password controls, and auditing. Chapter 7 Discusses manipulating data and administering PL/SQL programs. You will learn

  how to work with data using SQL, Data Pump, SQL*Loader, and triggers and how to tune the database for PL/SQL performance.

  Chapter 8 Discusses consistency and concurrency. You will learn how to configure and

  administer your undo tablespace. You will also learn about Oracle locking and how to detect and resolve locking conflicts.

  Chapter 9 Discusses performance monitoring and proactive maintenance. You will learn how

  to administer invalid and unusable objects, gather optimizer statistics, work with performance metrics, set alert thresholds, and use the tuning and diagnostic advisors.

  Chapter 10 Discusses backing up your Oracle 10 g database. You will learn about Oracle

  backup concepts, how to create and manage consistent, online, and incremental backups. You will also learn how to monitor the Flash Recovery area.

  Chapter 11 Discusses failures and how to recover your Oracle10 g database from them. You

  will learn about the various kinds of failures that can occur with an Oracle10 g database and how to recover from the loss of control files, redo logs, and datafiles.

  Each chapter ends with a list of exam essentials, which gives you a highlight of the chapter, with an emphasis on the topics that you need to be extra familiar with for the exam. The chapter

  Introduction

  chapter, after the “Review Questions” section.) Note the questions that confuse or trick you, and study those sections of the book again.

  The Sybex Test Engine Preparation Software

  We have worked hard to provide some really great tools to help you with your certification pro- cess. Load all the following tools on your workstation when you’re studying for the test.

  What’s on the CD?

  and the Sybex Test Engine exam preparation software have been specifically designed to help you study for and pass your exam. To learn all the material covered in this book, you’ll need to apply yourself regularly and with discipline. Try to set aside the same time period every day to study, and select a comfort- able and quiet place to do so. If you work hard, you will be surprised at how quickly you learn this material. All the best!

  

6. Remember to use the products on the CD included with this book. The electronic flashcards

  

5. Take the two Bonus Exams that are included on the accompanying CD. This will give you

a complete overview of what you can expect to see on the real test.

  

4. Answer the review questions related to that chapter. (The answers appear at the end of each

  How to Use This Book

  stand the reason for each step you take. If you do not have an Oracle database available, be sure to study the examples carefully.

  

3. Complete all hands-on exercises in the chapter, referring to the chapter so that you under-

  the test objectives listed at the beginning of each chapter. Pay extra close attention to any chapter related to questions that you missed in the Assessment Test.

  

2. Study each chapter carefully, making sure that you fully understand the information and