Tải bản đầy đủ (.pdf) (40 trang)

Tài liệu OCA Oracle Database 11g Administration I Exam Guide P1 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.6 MB, 40 trang )

OCA Oracle Database 11g:
Administration I
Exam Guide (Exam 1Z0-052)
John Watson
New York Chicago San Francisco Lisbon London Madrid
Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto
This publication and CD may be used in assisting students to prepare for the OCA
Oracle Database 11g: Administration I exam. Neither Oracle Corporation nor The
McGraw-Hill Companies warrant that use of this publication and CD will ensure
passing the relevant exam.
®
Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as
permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or
by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
0-07-159103-6
The material in this eBook also appears in the print version of this title: 0-07-159102-8.
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a
trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of
infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate
training programs. For more information, please contact George Hoare, Special Sales, at or (212)
904-4069.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the
work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve
one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon,
transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior
consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right
to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS


TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK,
INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR
OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that
its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any
inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no
responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its
licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or
inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply
to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
DOI: 10.1036/0071591028

I want to thank Silvia for looking after me (and our house, garden, cats,
and dogs) while I was working on this. She works much harder than me.
ABOUT THE AUTHOR
John Watson (Oxford, UK) works for BPLC Management Consultants, teaching
and consulting throughout Europe and Africa. He was with Oracle University for
several years in South Africa, and before that worked for a number of companies,
government departments, and NGOs in England and Europe. He is OCP qualified in
both database and Application Server administration. John is the author of several
books and numerous articles on technology and has twenty-five years of experience
in IT.
About the Technical Editor
April Wells (Austin, TX) is an experienced Oracle DBA who holds multiple
DBA OCP certifications. She currently manages Oracle databases and Oracle data
warehouses at NetSpend corporation in Austin, Texas. Previously, April has worked
for Oracle Corporation in Austin, Texas as on-site support at Dell, at Corporate
Systems in Amarillo, Texas, and at U.S. Steel in Pennsylvania and Minnesota.
Copyright © 2008 by The McGraw-Hill Companies, Inc. Click here for terms of use.

v
CONTENTS AT A GLANCE
1 Introduction to the Oracle Server Technologies . . . . . . . . . . . . . . . . . . 2
2 Exploring the Database Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3 Preparing the Database Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4 Creating an Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5 Managing the Oracle Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6 Configuring the Oracle Network Environment . . . . . . . . . . . . . . . . . . 193
7 Managing Database Storage Structures . . . . . . . . . . . . . . . . . . . . . . . . . 239
8 Administering User Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
9 Managing Schema Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
10 Managing Data and Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
11 Managing Undo Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
12 Implementing Oracle Database Security . . . . . . . . . . . . . . . . . . . . . . . . 443
13 Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
14 Performance Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
15 Backup and Recovery Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
16 Performing Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
17 Performing Database Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
vi
OCA Oracle Database 11g: Administration I Exam Guide
18 Moving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
19 Intelligent Infrastructure Enhancements . . . . . . . . . . . . . . . . . . . . . . . . 663
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
vii
CONTENTS
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
1 Introduction to the Oracle Server Technologies . . . . . . 1

Position the Oracle Product Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Server Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Development Tools and Languages . . . . . . . . . . . . . . . . . 8
The Oracle Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Exercise 1-1: Investigate DBMSs in Your Environment . . . 13
Explain Relational Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Rows and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Data Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Understand the SQL Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Appreciate the DBA’s Role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2 Exploring the Database Architecture . . . . . . . . . . . . . . . . 31
Describe the Single-Instance Architecture . . . . . . . . . . . . . . . . . . . . . . 32
Single-Instance Database Architecture . . . . . . . . . . . . . . . . . . 32
Distributed Systems Architectures . . . . . . . . . . . . . . . . . . . . . . 36
Exercise 2-1: Determine if the Database Is Single
Instance or Part of a Distributed System . . . . . . . . . . . . . . . 38
Explain the Memory Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The Database Buffer Cache
. . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The Log Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The Shared Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The Large Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
The Java Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
For more information about this title, click here

viii
OCA Oracle Database 11g: Administration I Exam Guide
The Streams Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Exercise 2-2: Investigate the Memory
Structures of the Instance . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Describe the Process Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
SMON, the System Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . 51
PMON, the Process Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DBWn, the Database Writer . . . . . . . . . . . . . . . . . . . . . . . . . . 52
LGWR, the Log Writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
CKPT, the Checkpoint Process . . . . . . . . . . . . . . . . . . . . . . . . 56
MMON, the Manageability Monitor . . . . . . . . . . . . . . . . . . . . 57
MMNL, the Manageability Monitor Light . . . . . . . . . . . . . . . 58
MMAN, the Memory Manager . . . . . . . . . . . . . . . . . . . . . . . . 58
ARCn, the Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
RECO, the Recoverer Process . . . . . . . . . . . . . . . . . . . . . . . . . 59
Some Other Background Processes . . . . . . . . . . . . . . . . . . . . . 60
Exercise 2-3: Investigate the Processes Running
in Your Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Summarize the Storage Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
The Physical Database Structures . . . . . . . . . . . . . . . . . . . . . . 65
The Logical Database Structures . . . . . . . . . . . . . . . . . . . . . . . 71
The Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Exercise 2-4: Investigate the Storage Structures
in Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3 Preparing the Database Environment . . . . . . . . . . . . . . 85
Identify the Tools for Administering an Oracle Database . . . . . . . . . . . 86
The Oracle Universal Installer . . . . . . . . . . . . . . . . . . . . . . . . . 86
Database Creation and Upgrade Tools . . . . . . . . . . . . . . . . . . . 91
Tools for Issuing Ad Hoc SQL: SQL*Plus
and SQL Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Exercise 3-1: Install SQL Developer on Windows . . . . . . . 97
Oracle Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Other Administration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Contents
ix
Plan an Oracle Database Installation . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Choice of Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Hardware and Operating System Resources . . . . . . . . . . . . . . 103
Exercise 3-2: Confirm Available Hardware Resources . . . . 104
Optimal Flexible Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 105
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Install the Oracle Software by Using the Oracle
Universal Installer (OUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Exercise 3-3: Install the Oracle Home . . . . . . . . . . . . . . . . 111
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4 Creating an Oracle Database . . . . . . . . . . . . . . . . . . . . . 123
Create a Database by Using the Database Configuration Assistant . . . 124
The Instance, the Database, and the Data Dictionary . . . . . . 125

Using the DBCA to Create a Database . . . . . . . . . . . . . . . . . . 126
Exercise 4-1: Use the DBCA to Create a Database . . . . . . 129
The Scripts and Other Files Created by the DBCA . . . . . . . . 133
The DBCA’s Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . 141

Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
5 Managing the Oracle Instance . . . . . . . . . . . . . . . . . . . . 151
Describe the Stages of Database Startup and Shutdown . . . . . . . . . . . . 152
Starting and Connecting to Database Control . . . . . . . . . . . . 153
Starting the Database Listener . . . . . . . . . . . . . . . . . . . . . . . . . 157
Starting SQL*Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Database Startup and Shutdown . . . . . . . . . . . . . . . . . . . . . . . 158
Exercise 5-1: Conduct a Startup and a Shutdown . . . . . . . 166
Set Database Initialization Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 168
Static and Dynamic Parameters, and the Initialization
Parameter File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
x
OCA Oracle Database 11g: Administration I Exam Guide
The Basic Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Exercise 5-2: Query and Set Initialization Parameters . . . . 174
Use the Alert Log and Trace Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Exercise 5-3: Use the Alert Log . . . . . . . . . . . . . . . . . . . . . . 178
Use Data Dictionary and Dynamic Performance Views . . . . . . . . . . . . 178
The Data Dictionary Views . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The Dynamic Performance Views . . . . . . . . . . . . . . . . . . . . . . 180

Exercise 5-4: Query Data Dictionary and
Dynamic Performance Views . . . . . . . . . . . . . . . . . . . . . . . . 182
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
6 Configuring the Oracle Network Environment . . . . . . 193
Configure and Manage the Oracle Network . . . . . . . . . . . . . . . . . . . . . 194
Oracle Net and the Client-Server Paradigm . . . . . . . . . . . . . . 194
A Word on Oracle Net and Communication Protocols . . . . . 196
Establishing a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Creating a Listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Database Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Techniques for Name Resolution . . . . . . . . . . . . . . . . . . . . . . . 205
The Listener Control Utility
. . . . . . . . . . . . . . . . . . . . . . . . . . 208
Configuring Service Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
File Names and the TNSADMIN Environment Variable . . . . 213
Database Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Exercise 6-1: Configure Oracle Net . . . . . . . . . . . . . . . . . . . 216
Use the Oracle Shared Server Architecture . . . . . . . . . . . . . . . . . . . . . 220
The Limitations of Dedicated Server Architecture . . . . . . . . . 220
The Shared Server Architecture . . . . . . . . . . . . . . . . . . . . . . . 222
Configuring Shared Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
When to Use the Shared Server . . . . . . . . . . . . . . . . . . . . . . . 225
Exercise 6-2 (optional): Set Up a Shared Server
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229


Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Contents
xi
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
7 Managing Database Storage Structures . . . . . . . . . . . . 239
Understand Tablespaces and Datafiles . . . . . . . . . . . . . . . . . . . . . . . . . 240
The Oracle Data Storage Model . . . . . . . . . . . . . . . . . . . . . . . 240
Segments, Extents, Blocks, and Rows . . . . . . . . . . . . . . . . . . . 243
Automatic Storage Management (ASM) . . . . . . . . . . . . . . . . 247
Exercise 7-1: Investigate the Database’s
Data Storage Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Create and Manage Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Tablespace Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Altering Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Dropping Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Oracle-Managed Files (OMF) . . . . . . . . . . . . . . . . . . . . . . . . . 263
Exercise 7-2: Create, Alter, and Drop Tablespaces . . . . . . . 264
Manage Space in Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Extent Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Segment Space Management . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Exercise 7-3: Change Tablespace Characteristics . . . . . . . . 269
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

8 Administering User Security . . . . . . . . . . . . . . . . . . . . . 281
Create and Manage Database User Accounts . . . . . . . . . . . . . . . . . . . . 282
User Account Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Authentication Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Creating Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Exercise 8-1: Create Users . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Grant and Revoke Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
System Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Object Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Exercise 8-2: Grant Direct Privileges . . . . . . . . . . . . . . . . . 303
xii
OCA Oracle Database 11g: Administration I Exam Guide
Create and Manage Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Creating and Granting Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Predefined Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Enabling Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Exercise 8-3: Create and Grant Roles . . . . . . . . . . . . . . . . . 309
Create and Manage Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Password Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Resource Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Creating and Assigning Profiles . . . . . . . . . . . . . . . . . . . . . . . . 315
Exercise 8-4: Create and Use Profiles . . . . . . . . . . . . . . . . . 318
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
9 Managing Schema Objects . . . . . . . . . . . . . . . . . . . . . . . 329
Create and Modify Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

Users, User Accounts, Schemas, and Schema Objects . . . . . . 331
Naming Schema Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Object Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Creating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Exercise 9-1: Create and Modify Tables . . . . . . . . . . . . . . . 340
Manage Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
The Types of Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Defining Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Constraint State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Constraint Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Exercise 9-2: Manage Constraints . . . . . . . . . . . . . . . . . . . . 350
Create Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Why Indexes Are Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Types of Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Creating and Using Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Modifying and Dropping Indexes . . . . . . . . . . . . . . . . . . . . . . . 361
Exercise 9-3: Create Indexes . . . . . . . . . . . . . . . . . . . . . . . . 362
Create and Use Temporary Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Exercise 9-4: Create and Use Temporary Tables . . . . . . . . . 365
Contents
xiii
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
10 Managing Data and Concurrency . . . . . . . . . . . . . . . . . . 375
Manage Data Using DML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

Database Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Executing SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Transaction Control: COMMIT,
ROLLBACK, SAVEPOINT . . . . . . . . . . . . . . . . . . . . . . . . 383
Exercise 10-1: Manage Data Using DML . . . . . . . . . . . . . . 388
Identify and Administer PL/SQL Objects . . . . . . . . . . . . . . . . . . . . . . . 389
SQL and Procedural Languages . . . . . . . . . . . . . . . . . . . . . . . . 389
Stored and Anonymous PL/SQL . . . . . . . . . . . . . . . . . . . . . . . 390
PL/SQL Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Exercise 10-2: Create PL/SQL Objects . . . . . . . . . . . . . . . . 397
Monitor and Resolve Locking Conflicts . . . . . . . . . . . . . . . . . . . . . . . . 399
Shared and Exclusive Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
The Enqueue Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Lock Contention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Deadlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Exercise 10-3: Detect and Resolve Lock Contention . . . . . 406
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
11 Managing Undo Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Explain the Purpose of Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Exercise 11-1: Use Undo Data . . . . . . . . . . . . . . . . . . . . . . 418
Understand How Transactions Generate Undo . . . . . . . . . . . . . . . . . . 419
Exercise 11-2: Work with Transactions
and Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
xiv
OCA Oracle Database 11g: Administration I Exam Guide

Manage Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Error Conditions Related to Undo . . . . . . . . . . . . . . . . . . . . . . 424
Parameters for Undo Management,
and Retention Guarantee . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Sizing and Monitoring the Undo Tablespace . . . . . . . . . . . . . . 427
Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Creating and Managing Undo Tablespaces . . . . . . . . . . . . . . . 430
Exercise 11-3: Work with Undo Tablespaces . . . . . . . . . . . 431
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
12 Implementing Oracle Database Security . . . . . . . . . . . 443
Database Security and Principle of Least Privilege . . . . . . . . . . . . . . . . 444
Public Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Security-Critical Instance Parameters . . . . . . . . . . . . . . . . . . . 446
Exercise 12-1: Remove Some Potentially
Dangerous Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Work with Standard Database Auditing . . . . . . . . . . . . . . . . . . . . . . . . 452
Auditing SYSDBA Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Database Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Value-Based Auditing with Triggers . . . . . . . . . . . . . . . . . . . . . 457
Fine-Grained Auditing (FGA)
. . . . . . . . . . . . . . . . . . . . . . . . 458
Exercise 12-2: Use Standard Database Auditing . . . . . . . . . 461
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
13 Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Use and Manage Optimizer Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Object Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
Gathering Statistics Manually . . . . . . . . . . . . . . . . . . . . . . . . . 474
The STATISTICS_LEVEL Instance Parameter . . . . . . . . . . . 478
Contents
xv
Exercise 13-1: Gather Optimizer Statistics with
Various Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Use and Manage the Automatic Workload Repository . . . . . . . . . . . . . 481
Gathering AWR Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Managing the AWR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Statistics, Metrics, and Baselines . . . . . . . . . . . . . . . . . . . . . . . 484
The DBMS_WORKLOAD_REPOSITORY Package . . . . . . . 485
Exercise 13-2: Monitor the Automatic
Workload Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Use the Advisory Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
The Automatic Database Diagnostic Monitor . . . . . . . . . . . . 487
The Advisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Automatic Maintenance Jobs . . . . . . . . . . . . . . . . . . . . . . . . . 492
Exercise 13-3: Generate an ADDM Report . . . . . . . . . . . . 496
Manage Alerts and Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Alert Condition Monitoring and Notifications . . . . . . . . . . . . 498
Setting Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
The Notification System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Exercise 13-4: Configure Alerts . . . . . . . . . . . . . . . . . . . . . . 504
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507


Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Lab Question
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
14 Performance Management . . . . . . . . . . . . . . . . . . . . . . . 515
Use Automatic Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . 516
PGA Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
SGA Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Automatic Memory Management . . . . . . . . . . . . . . . . . . . . . . 520
Exercise 14-1: Set the Memory Management
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Use Memory Advisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Exercise 14-2: Use the Memory Advisors . . . . . . . . . . . . . . 524
Troubleshoot Invalid and Unusable Objects . . . . . . . . . . . . . . . . . . . . . 526
Invalid Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Unusable Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Exercise 14-3: Repair Invalid Objects
and Unusable Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
xvi
OCA Oracle Database 11g: Administration I Exam Guide
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
15 Backup and Recovery Concepts . . . . . . . . . . . . . . . . . . . 541
Identify the Types of Failure That Can Occur

in an Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
Statement Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
User Process Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
User Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Media Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Instance Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Exercise 15-1: Correct Statement Failures . . . . . . . . . . . . . 550
Describe Ways to Tune Instance Recovery . . . . . . . . . . . . . . . . . . . . . . 551
The Mechanics of Instance Recovery . . . . . . . . . . . . . . . . . . . 552
The Impossibility of Database Corruption . . . . . . . . . . . . . . . . 553
Tuning Instance Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
The MTTR Advisor and Checkpoint Auto-Tuning . . . . . . . . 555
Exercise 15-2: Monitor Instance Recovery Times . . . . . . . . 557
Identify the Importance of Checkpoints, Redo Log Files,
and Archived Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
Checkpointing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8
Protecting the Online Redo Log Files . . . . . . . . . . . . . . . . . . . 560
Archivelog Mode and the Archiver Process(es) . . . . . . . . . . . 563
Exercise 15-3: Investigate the Redo Log Configuration . . . 565
Overview of Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Exercise 15-4: Investigate the Flash Recovery
Area Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Configure ARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
Exercise 15-5: Enable Archivelog Mode . . . . . . . . . . . . . . . 570
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Contents
xvii
16 Performing Database Backups . . . . . . . . . . . . . . . . . . . . 581
Create Consistent Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
User-Managed Consistent Backups . . . . . . . . . . . . . . . . . . . . . 583
Server-Managed Consistent Backups . . . . . . . . . . . . . . . . . . . . 585
Exercise 16-1: Managing Consistent User- and
Server-Managed Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
Back Up Your Database Without Shutting It Down . . . . . . . . . . . . . . . 589
User-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . . . . 589
Server-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . . . 592
Exercise 16-2: Perform Server-Managed and
User-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . . 593
Create Incremental Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Exercise 16-3: Make an Incremental Backup . . . . . . . . . . . 596
Automate Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Exercise 16-4: Define an Automatic Backup Job . . . . . . . . 597
Manage Backups, View Backup Reports, and Monitor the
Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
The RMAN Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Reports on Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Managing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Monitoring the Flash Recovery Area . . . . . . . . . . . . . . . . . . . . 603
Exercise 16-5: Manage RMAN Backups . . . . . . . . . . . . . . . 605

✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
17 Performing Database Recovery . . . . . . . . . . . . . . . . . . . 615
Overview of Data Recovery Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Recovery from Loss of the Controlfile . . . . . . . . . . . . . . . . . . . 617
Recovery from Loss of an Online Redo Log File Member . . . . 618
Loss of Any Datafile in Noarchivelog Mode . . . . . . . . . . . . . . 619
Loss of a Datafile in Archivelog Mode . . . . . . . . . . . . . . . . . . . 619
The Health Monitor and the ADR . . . . . . . . . . . . . . . . . . . . . 621
The Capabilities and Limitations of the DRA . . . . . . . . . . . . 621
xviii
OCA Oracle Database 11g: Administration I Exam Guide
Exercise 17-1: Use the DRA to Diagnose and
Advise Upon Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Use Data Recovery Advisor to Perform Recovery
(Control File, Redo Log File, and Data File) . . . . . . . . . . . . . . . . . . . . . 624
Exercise 17-2: Repair a Fault with the DRA . . . . . . . . . . . . 628
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
18 Moving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Describe and Use Methods to Move Data (SQL Loader,
Directory Objects, External Tables) . . . . . . . . . . . . . . . . . . . . . . . . . . 636
SQL*Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
Directory Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
External Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
Exercise 18-1: Use SQL*Loader and External Tables . . . . . 644

Explain the General Architecture of Oracle Data Pump . . . . . . . . . . . 647
Data Pump and Export/Import . . . . . . . . . . . . . . . . . . . . . . . . . 647
Data Pump Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
Directories and File Locations . . . . . . . . . . . . . . . . . . . . . . . . . 649
Direct Path or External Table Path? . . . . . . . . . . . . . . . . . . . . . 650
Exercise 18-2: Perform a Data Pump Export . . . . . . . . . . . . 651
Use Data Pump Export and Import to Move Data
Between Oracle Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
Using Data Pump with the Command-Line Utilities . . . . . . . 653
Using Data Pump with Database Control . . . . . . . . . . . . . . . . 654
Exercise 18-3: Use Data Pump in Network Mode . . . . . . . . 655
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
Contents
xix
19 Intelligent Infrastructure Enhancements . . . . . . . . . . . 663
Use the Enterprise Manager Support Workbench . . . . . . . . . . . . . . . . . 665
The Automatic Diagnostic Repository (ADR) . . . . . . . . . . . . 665
Problems and Incidents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
The ADR Command-Line Interface (ADRCI) . . . . . . . . . . . . 666
The Support Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
Exercise 19-1: Use the Support Workbench . . . . . . . . . . . . 669
Manage Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Types of Patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Integration with MetaLink and the Patch Advisor . . . . . . . . . 671

Applying Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Exercise 19-2: Download and Apply a Patch . . . . . . . . . . . 677
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
About the CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
Installing and Running MasterExam . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
MasterExam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
Electronic Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Removing Installation(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
LearnKey Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705

This page intentionally left blank
xxi
INTRODUCTION
T
here is an ever increasing demand for staff with IT industry certification. The benefits
to employers are significant—they can be certain that staff have a certain level of
competence—and the benefits to the individuals, in terms of demand for their services
are equally great. Many employers are now requiring technical staff to have certifications and many
IT purchasers will not buy from firms that do not have certified staff. The Oracle certifications are

among the most sought after. But apart from rewards in a business sense, knowing that you are
among a relatively small pool of elite Oracle professionals and have proved your competence is a
personal reward well worth attaining.
There are several Oracle certification tracks—this book is concerned with the
Oracle Database Administration certification track, specifically for release 11g of the
database. There are three levels of DBA certification: Certified Associate (OCA),
Certified Professional (OCP), and Certified Master (OCM). The OCA qualification
is based on two examinations, the second of which is covered in this book. The
OCP qualification requires passing a third examination. These examinations can be
taken at any Prometric Center and consists of between sixty and seventy questions
to be completed in ninety minutes. The OCM qualification requires completing
a further two-day evaluation at an Oracle testing center, involving simulations of
complex environments and use of advanced techniques.
To prepare for the second OCA examination, you can attend an Oracle University
instructor-led training course, you can study Oracle University online learning
material, or you can read this book. In all cases, you should also refer to the Oracle
Documentation Library for details of syntax. This book will be a valuable addition to
other study methods, but it is also sufficient by itself. It has been designed with the
examination objectives in mind, though it also includes a great deal of information that
will be useful to you in the course of your work.
However, it is not enough to buy the book, place it under your pillow, and assume
that knowledge will permeate the brain by a process of osmosis; you must read it
thoroughly, work through the exercises and sample questions, and experiment further
with various commands. As you become more familiar with the Oracle environment,
you will realize that there is one golden rule:
When it doubt, try it out.
Copyright © 2008 by The McGraw-Hill Companies, Inc. Click here for terms of use.
xxii
OCA Oracle Database 11g: Administration I Exam Guide
In a multitude of cases, you will find that a simple test that takes a couple of

minutes can save hours of speculation and poring through manuals. If anything is
ever unclear, construct an example, and see what happens. This book was developed
using Windows and Linux, but to carry out the exercises and your further investigations,
you can use any platform that is supported for Oracle.
Your study of Oracle database administration is about to begin—you can continue
these studies for the rest of your working life. Enjoy!
In This Book
This book is organized to serve as an in-depth review for the OCA Oracle Database 11g:
Administration I Exam for Oracle professionals. Each chapter covers a major aspect
of the exam; all the OCA official certification objectives are carefully covered in
the book.
On the CD-ROM
The CD-ROM contains the entire contents of the book in electronic form, as well
as one practice test that simulates the real Oracle Database 11g OCA certification
test. For more information on the CD-ROM, please see the appendix. A bonus exam
is available for download.
Exam Readiness Checklist
At the end of this introduction, you will find an Exam Readiness Checklist. This
table lists the official exam objectives. The checklist also allows you to gauge your
level of expertise on each objective at the outset of your studies. This should allow
you to check your progress and make sure you spend the time you need on more
difficult or unfamiliar sections. Each objective is exactly as Oracle Corporation
presents it, including the chapter and page reference.
In Every Chapter
This book includes a set of chapter components that call your attention to important
items, reinforce important points, and provide helpful exam-taking hints. Take a
look at what you’ll find in every chapter:
■ Exam Watch notes call attention to information about, and potential pitfalls
in the exam.
Introduction

xxiii
■ Exercises are interspersed throughout the chapters, and they allow you to
get the hands-on experience you need in order to pass the exams. They help
you master skills that are likely to be an area of focus on the exam. Don’t
just read through the exercises, they are hands-on practice that you should
be comfortable completing. Learning by doing is an effective way to increase
your competency with a product.
■ On the Job notes describe the issues that come up most often in real-world
settings. They provide a valuable perspective on certification- and product-
related topics. They point out common mistakes and address questions that
have arisen from on-the-job discussions and experience.
■ Inside the Exam sections toward the end of each chapter are designed to
anticipate what the exam will emphasize. These are pointers regarding key
topics to focus on, based on experience taking many production and beta
examinations, and having been on the Oracle internal group that validates
examination questions.
■ The Certification Summary is a succinct review of the chapter and a restatement
of salient points regarding the exam.
■ The Two-Minute Drill at the end of every chapter is a checklist of the main
points of the chapter. You can use it for a quick, last-minute review before
the test.
■ The Self Test offers questions similar to those found on the certification
exam. The answers to these questions, as well as explanations of the answers,
can be found at the end of each chapter. By taking the Self Test after
completing each chapter, you’ll reinforce what you’ve learned from that
chapter, while becoming familiar with the structure of the exam questions.
■ The Lab Questions at the end of the Self Test sections offer a unique and
challenging question format that, in order to answer correctly, require the
reader to understand multiple chapter concepts. These questions are more
complex and more comprehensive than the other questions, as they test your

ability to take all the knowledge you have gained from reading the chapter
and apply it to complicated, real-world situations.

Q&A
The redo log stream
includes all changes: those applied to data
segments and to undo segments, for both
committed and uncommitted transactions.
xxiv
OCA Oracle Database 11g: Administration I Exam Guide
Some Pointers
Once you’ve finished reading this book, set aside some time to do a thorough review.
You might want to return to the book several times and make use of all the methods
it offers for reviewing the material before taking the examination.
■ Reread all the Two-Minute Drills or have someone quiz you You also can
use the drills as a way to do a quick cram before the exam.
■ Reread all the Exam Watch notes Remember that these notes are based
on the OCA exam. They will draw your attention to what you should expect
and what you should be on the lookout for.
■ Retake the Self Tests It is a good idea to take the Self Test right after
you’ve read the chapter because the questions help reinforce what you’ve just
learned, then do them again at the end. In the examination, the questions do
not come conveniently grouped; you will have to be prepared to jump from
one topic to another.
■ Complete the Exercises Did you do the chapter Exercises and the Lab
Questions when you read each chapter? If not, do them! These exercises are
designed to cover exam topics and there’s no better way to get to know this
material than by practicing. Be sure you understand why you are performing
each step in each exercise. If there is something you are not completely clear
about, reread that section in the chapter.

■ Take the exam You will have only an average of a minute or so for each
question. Go through them all, fast, answering the ones you know, and
marking the ones you don’t know for review. Then go through the marked
questions again. That will take up most of the time. If there are still some
questions you really don’t know, guess; there are no marks deducted for
incorrect answers.

×