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

OCA Oracle Database 11g: Administration I Exam Guide (Exam 1Z0052)

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 (44.25 MB, 768 trang )


®

OCA Oracle Database 11g:
Administration I
Exam Guide (Exam 1Z0-052)
John Watson

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.
New York Chicago San Francisco Lisbon London Madrid
Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto


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.


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

7


Managing Database Storage Structures

8

Administering User Security

9

Managing Schema Objects

10

Managing Data and Concurrency

11

Managing Undo Data

12

Implementing Oracle Database Security

13

Database Maintenance

14

Performance Management


...................................

515

15

Backup and Recovery Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

541

16

Performing Database Backups

................................

581

17

Performing Database Recovery

...............................

615

..................

193


.........................

239

.................................

281

..................................

329

.............................

375

.......................................

415

........................

443

......................................

471

v



vi

OCA Oracle Database 11g: Administration I Exam Guide

18

Moving Data

19

Intelligent Infrastructure Enhancements

635

........................

663

................................................

685

.................................................

689

....................................................

705


Appendix
Glossary
Index

.............................................


For more information about this title, click here

CONTENTS

Introduction

1

2

........................................

xxi

Introduction to the Oracle Server Technologies . . . . . .

1

Position the Oracle Product Family . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Server Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Development Tools and Languages . . . . . . . . . . . . . . . . .
The Oracle Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercise 1-1: Investigate DBMSs in Your Environment . . .
Explain Relational Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rows and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understand the SQL Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appreciate the DBA’s Role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
3
8
12
13
13
13
17
22
24
26
27
28
29
29

Exploring the Database Architecture . . . . . . . . . . . . . . . .


31

Describe the Single-Instance Architecture . . . . . . . . . . . . . . . . . . . . . .
Single-Instance Database Architecture . . . . . . . . . . . . . . . . . .
Distributed Systems Architectures . . . . . . . . . . . . . . . . . . . . . .
Exercise 2-1: Determine if the Database Is Single
Instance or Part of a Distributed System . . . . . . . . . . . . . . .
Explain the Memory Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Database Buffer Cache . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Log Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Shared Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Large Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Java Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32
32
36
38
39
40
42
44
48
48

vii


viii


OCA Oracle Database 11g: Administration I Exam Guide

The Streams Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 2-2: Investigate the Memory
Structures of the Instance . . . . . . . . . . . . . . . . . . . . . . . . . .
Describe the Process Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SMON, the System Monitor . . . . . . . . . . . . . . . . . . . . . . . . . .
PMON, the Process Monitor . . . . . . . . . . . . . . . . . . . . . . . . . .
DBWn, the Database Writer . . . . . . . . . . . . . . . . . . . . . . . . . .
LGWR, the Log Writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CKPT, the Checkpoint Process . . . . . . . . . . . . . . . . . . . . . . . .
MMON, the Manageability Monitor . . . . . . . . . . . . . . . . . . . .
MMNL, the Manageability Monitor Light . . . . . . . . . . . . . . .
MMAN, the Memory Manager . . . . . . . . . . . . . . . . . . . . . . . .
ARCn, the Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RECO, the Recoverer Process . . . . . . . . . . . . . . . . . . . . . . . . .
Some Other Background Processes . . . . . . . . . . . . . . . . . . . . .
Exercise 2-3: Investigate the Processes Running
in Your Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summarize the Storage Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Physical Database Structures . . . . . . . . . . . . . . . . . . . . . .
The Logical Database Structures . . . . . . . . . . . . . . . . . . . . . . .
The Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 2-4: Investigate the Storage Structures
in Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


3

Preparing the Database Environment

49
49
51
51
51
52
54
56
57
58
58
58
59
60
62
65
65
71
72
74
77
79
81
82
83


..............

85

Identify the Tools for Administering an Oracle Database . . . . . . . . . . .
The Oracle Universal Installer . . . . . . . . . . . . . . . . . . . . . . . . .
Database Creation and Upgrade Tools . . . . . . . . . . . . . . . . . . .
Tools for Issuing Ad Hoc SQL: SQL*Plus
and SQL Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 3-1: Install SQL Developer on Windows . . . . . . .
Oracle Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Administration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . .

86
86
91
92
97
98
99


Contents

Plan an Oracle Database Installation . . . . . . . . . . . . . . . . . . . . . . . . . .
Choice of Operating System . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware and Operating System Resources . . . . . . . . . . . . . .
Exercise 3-2: Confirm Available Hardware Resources . . . .
Optimal Flexible Architecture . . . . . . . . . . . . . . . . . . . . . . . . .

Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Install the Oracle Software by Using the Oracle
Universal Installer (OUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 3-3: Install the Oracle Home
................
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

Creating an Oracle Database

Managing the Oracle Instance

101
101
103
104
105
107
110
111
115
116
118
119
120


. . . . . . . . . . . . . . . . . . . . . 123

Create a Database by Using the Database Configuration Assistant . . .
The Instance, the Database, and the Data Dictionary . . . . . .
Using the DBCA to Create a Database . . . . . . . . . . . . . . . . . .
Exercise 4-1: Use the DBCA to Create a Database
......
The Scripts and Other Files Created by the DBCA . . . . . . . .
The DBCA’s Other Functions . . . . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

ix

124
125
126
129
133
141
144
145
147
148

149

. . . . . . . . . . . . . . . . . . . . 151

Describe the Stages of Database Startup and Shutdown . . . . . . . . . . . .
Starting and Connecting to Database Control . . . . . . . . . . . .
Starting the Database Listener . . . . . . . . . . . . . . . . . . . . . . . . .
Starting SQL*Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Database Startup and Shutdown . . . . . . . . . . . . . . . . . . . . . . .
Exercise 5-1: Conduct a Startup and a Shutdown
.......
Set Database Initialization Parameters . . . . . . . . . . . . . . . . . . . . . . . . .
Static and Dynamic Parameters, and the Initialization
Parameter File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

152
153
157
158
158
166
168
169


x

OCA Oracle Database 11g: Administration I Exam Guide

The Basic Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercise 5-2: Query and Set Initialization Parameters . . . .
Use the Alert Log and Trace Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 5-3: Use the Alert Log . . . . . . . . . . . . . . . . . . . . . .
Use Data Dictionary and Dynamic Performance Views . . . . . . . . . . . .
The Data Dictionary Views . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Dynamic Performance Views . . . . . . . . . . . . . . . . . . . . . .
Exercise 5-4: Query Data Dictionary and
Dynamic Performance Views . . . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

Configuring the Oracle Network Environment

171
174
176
178
178
179
180
182
184
185
188
189

191

. . . . . . 193

Configure and Manage the Oracle Network . . . . . . . . . . . . . . . . . . . . .
Oracle Net and the Client-Server Paradigm . . . . . . . . . . . . . .
A Word on Oracle Net and Communication Protocols . . . . .
Establishing a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Database Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Techniques for Name Resolution . . . . . . . . . . . . . . . . . . . . . . .
The Listener Control Utility . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Service Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Names and the TNSADMIN Environment Variable . . . .
Database Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 6-1: Configure Oracle Net . . . . . . . . . . . . . . . . . . .
Use the Oracle Shared Server Architecture . . . . . . . . . . . . . . . . . . . . .
The Limitations of Dedicated Server Architecture . . . . . . . . .
The Shared Server Architecture . . . . . . . . . . . . . . . . . . . . . . .
Configuring Shared Server . . . . . . . . . . . . . . . . . . . . . . . . . . . .
When to Use the Shared Server . . . . . . . . . . . . . . . . . . . . . . .
Exercise 6-2 (optional): Set Up a Shared Server
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

194
194
196

197
200
203
205
208
211
213
214
216
220
220
222
224
225
227
229
230
233


Contents

Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Managing Database Storage Structures

Administering User Security


235
236

. . . . . . . . . . . . 239

Understand Tablespaces and Dataf iles . . . . . . . . . . . . . . . . . . . . . . . . .
The Oracle Data Storage Model . . . . . . . . . . . . . . . . . . . . . . .
Segments, Extents, Blocks, and Rows . . . . . . . . . . . . . . . . . . .
Automatic Storage Management (ASM) . . . . . . . . . . . . . . . .
Exercise 7-1: Investigate the Database’s
Data Storage Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create and Manage Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tablespace Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Altering Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dropping Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle-Managed Files (OMF) . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 7-2: Create, Alter, and Drop Tablespaces . . . . . . .
Manage Space in Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extent Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Segment Space Management . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 7-3: Change Tablespace Characteristics . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8


xi

240
240
243
247
250
251
251
258
262
263
264
266
267
268
269
272
273
276
277
278

. . . . . . . . . . . . . . . . . . . . . 281

Create and Manage Database User Accounts . . . . . . . . . . . . . . . . . . . .
User Account Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Authentication Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 8-1: Create Users . . . . . . . . . . . . . . . . . . . . . . . . . .

Grant and Revoke Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 8-2: Grant Direct Privileges
.................

282
283
288
292
294
297
297
300
303


xii

OCA Oracle Database 11g: Administration I Exam Guide

Create and Manage Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Granting Roles . . . . . . . . . . . . . . . . . . . . . . . . . .
Predefined Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 8-3: Create and Grant Roles . . . . . . . . . . . . . . . . .
Create and Manage Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Password Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resource Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Assigning Profiles . . . . . . . . . . . . . . . . . . . . . . . .

Exercise 8-4: Create and Use Profiles . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

Managing Schema Objects

305
305
307
308
309
312
312
314
315
318
321
322
324
326
327

. . . . . . . . . . . . . . . . . . . . . . . 329

Create and Modify Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Users, User Accounts, Schemas, and Schema Objects . . . . . .
Naming Schema Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 9-1: Create and Modify Tables . . . . . . . . . . . . . . .
Manage Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Types of Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Constraint State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Constraint Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 9-2: Manage Constraints . . . . . . . . . . . . . . . . . . . .
Create Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Why Indexes Are Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Types of Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Using Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying and Dropping Indexes . . . . . . . . . . . . . . . . . . . . . . .
Exercise 9-3: Create Indexes . . . . . . . . . . . . . . . . . . . . . . . .
Create and Use Temporary Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 9-4: Create and Use Temporary Tables . . . . . . . . .

330
331
332
334
335
338
340
342
342

346
348
349
350
352
353
354
360
361
362
362
365


Contents

✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10 Managing Data and Concurrency

367
368
370
372
373


. . . . . . . . . . . . . . . . . . 375

Manage Data Using DML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Database Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Executing SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transaction Control: COMMIT,
ROLLBACK, SAVEPOINT . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 10-1: Manage Data Using DML . . . . . . . . . . . . . .
Identify and Administer PL/SQL Objects . . . . . . . . . . . . . . . . . . . . . . .
SQL and Procedural Languages . . . . . . . . . . . . . . . . . . . . . . . .
Stored and Anonymous PL/SQL . . . . . . . . . . . . . . . . . . . . . . .
PL/SQL Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 10-2: Create PL/SQL Objects . . . . . . . . . . . . . . . .
Monitor and Resolve Locking Conflicts . . . . . . . . . . . . . . . . . . . . . . . .
Shared and Exclusive Locks . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Enqueue Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lock Contention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deadlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 10-3: Detect and Resolve Lock Contention . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11 Managing Undo Data

xiii

377

377
379
383
388
389
389
390
391
397
399
399
400
401
406
406
408
409
411
412
413

. . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

Explain the Purpose of Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 11-1: Use Undo Data
......................
Understand How Transactions Generate Undo . . . . . . . . . . . . . . . . . .
Exercise 11-2: Work with Transactions
and Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


416
418
419
422


xiv

OCA Oracle Database 11g: Administration I Exam Guide

Manage Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error Conditions Related to Undo . . . . . . . . . . . . . . . . . . . . . .
Parameters for Undo Management,
and Retention Guarantee . . . . . . . . . . . . . . . . . . . . . . . . . .
Sizing and Monitoring the Undo Tablespace . . . . . . . . . . . . . .
Flashback Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Managing Undo Tablespaces . . . . . . . . . . . . . . .
Exercise 11-3: Work with Undo Tablespaces . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12 Implementing Oracle Database Security

424
427
428
430

431
434
435
437
439
440

. . . . . . . . . . . 443

Database Security and Principle of Least Privilege . . . . . . . . . . . . . . . .
Public Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Security-Critical Instance Parameters . . . . . . . . . . . . . . . . . . .
Exercise 12-1: Remove Some Potentially
Dangerous Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Work with Standard Database Auditing . . . . . . . . . . . . . . . . . . . . . . . .
Auditing SYSDBA Activity . . . . . . . . . . . . . . . . . . . . . . . . . . .
Database Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Value-Based Auditing with Triggers . . . . . . . . . . . . . . . . . . . . .
Fine-Grained Auditing (FGA) . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 12-2: Use Standard Database Auditing . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13 Database Maintenance

423
424


444
445
446
451
452
452
453
457
458
461
464
465
467
469
470

. . . . . . . . . . . . . . . . . . . . . . . . . . . 471

Use and Manage Optimizer Statistics . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Gathering Statistics Manually . . . . . . . . . . . . . . . . . . . . . . . . .
The STATISTICS_LEVEL Instance Parameter . . . . . . . . . . .

472
473
474
478



Contents

Gather Optimizer Statistics with
Various Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use and Manage the Automatic Workload Repository . . . . . . . . . . . . .
Gathering AWR Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing the AWR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statistics, Metrics, and Baselines . . . . . . . . . . . . . . . . . . . . . . .
The DBMS_WORKLOAD_REPOSITORY Package . . . . . . .
Exercise 13-2: Monitor the Automatic
Workload Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use the Advisory Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Automatic Database Diagnostic Monitor . . . . . . . . . . . .
The Advisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Automatic Maintenance Jobs . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 13-3: Generate an ADDM Report . . . . . . . . . . . .
Manage Alerts and Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Alert Condition Monitoring and Notifications . . . . . . . . . . . .
Setting Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Notification System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 13-4: Configure Alerts . . . . . . . . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xv

Exercise 13-1:


14 Performance Management

479
481
481
483
484
485
486
487
487
489
492
496
498
498
499
501
504
507
508
510
512
513

. . . . . . . . . . . . . . . . . . . . . . . 515

Use Automatic Memory Management . . . . . . . . . . . . . . . . . . . . . . . . .
PGA Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . .

SGA Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . .
Automatic Memory Management . . . . . . . . . . . . . . . . . . . . . .
Exercise 14-1: Set the Memory Management
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use Memory Advisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 14-2: Use the Memory Advisors . . . . . . . . . . . . . .
Troubleshoot Invalid and Unusable Objects . . . . . . . . . . . . . . . . . . . . .
Invalid Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unusable Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 14-3: Repair Invalid Objects
and Unusable Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

516
516
519
520
521
522
524
526
527
529
531


xvi

OCA Oracle Database 11g: Administration I Exam Guide

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

Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15 Backup and Recovery Concepts

535
536
538
539
540

. . . . . . . . . . . . . . . . . . . 541

Identify the Types of Failure That Can Occur
in an Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statement Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User Process Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Media Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Instance Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 15-1: Correct Statement Failures . . . . . . . . . . . . .
Describe Ways to Tune Instance Recovery . . . . . . . . . . . . . . . . . . . . . .
The Mechanics of Instance Recovery . . . . . . . . . . . . . . . . . . .
The Impossibility of Database Corruption . . . . . . . . . . . . . . . .
Tuning Instance Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The MTTR Advisor and Checkpoint Auto-Tuning . . . . . . . .
Exercise 15-2: Monitor Instance Recovery Times . . . . . . . .
Identify the Importance of Checkpoints, Redo Log Files,

and Archived Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checkpointing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Protecting the Online Redo Log Files . . . . . . . . . . . . . . . . . . .
Archivelog Mode and the Archiver Process(es) . . . . . . . . . . .
Exercise 15-3: Investigate the Redo Log Configuration . . .
Overview of Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 15-4: Investigate the Flash Recovery
Area Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure ARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 15-5: Enable Archivelog Mode . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

542
542
545
546
548
550
550
551
552
553
554
555
557
558

558
560
563
565
566
567
568
570
573
575
577
578
579


Contents

16 Performing Database Backups

. . . . . . . . . . . . . . . . . . . . 581

Create Consistent Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . .
User-Managed Consistent Backups . . . . . . . . . . . . . . . . . . . . .
Server-Managed Consistent Backups . . . . . . . . . . . . . . . . . . . .
Exercise 16-1: Managing Consistent User- and
Server-Managed Backups . . . . . . . . . . . . . . . . . . . . . . . . . . .
Back Up Your Database Without Shutting It Down . . . . . . . . . . . . . . .
User-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . . . .
Server-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 16-2: Perform Server-Managed and

User-Managed Open Backups . . . . . . . . . . . . . . . . . . . . . . .
Create Incremental Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 16-3: Make an Incremental Backup . . . . . . . . . . .
Automate Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 16-4: Define an Automatic Backup Job . . . . . . . .
Manage Backups, View Backup Reports, and Monitor the
Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The RMAN Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reports on Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitoring the Flash Recovery Area . . . . . . . . . . . . . . . . . . . .
Exercise 16-5: Manage RMAN Backups . . . . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17 Performing Database Recovery

xvii

583
583
585
587
589
589
592
593

594
596
597
597
599
599
601
602
603
605
607
609
611
613
614

. . . . . . . . . . . . . . . . . . . 615

Overview of Data Recovery Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recovery from Loss of the Controlfile . . . . . . . . . . . . . . . . . . .
Recovery from Loss of an Online Redo Log File Member . . . .
Loss of Any Datafile in Noarchivelog Mode . . . . . . . . . . . . . .
Loss of a Datafile in Archivelog Mode . . . . . . . . . . . . . . . . . . .
The Health Monitor and the ADR . . . . . . . . . . . . . . . . . . . . .
The Capabilities and Limitations of the DRA . . . . . . . . . . . .

616
617
618
619

619
621
621


xviii

OCA Oracle Database 11g: Administration I Exam Guide

Use the DRA to Diagnose and
Advise Upon Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use Data Recovery Advisor to Perform Recovery
(Control File, Redo Log File, and Data File) . . . . . . . . . . . . . . . . . . . . .
Exercise 17-2: Repair a Fault with the DRA . . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 17-1:

18 Moving Data

623
624
628
629
630
632
633

634

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

Describe and Use Methods to Move Data (SQL Loader,
Directory Objects, External Tables) . . . . . . . . . . . . . . . . . . . . . . . . . .
SQL*Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Directory Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
External Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 18-1: Use SQL*Loader and External Tables . . . . .
Explain the General Architecture of Oracle Data Pump . . . . . . . . . . .
Data Pump and Export/Import . . . . . . . . . . . . . . . . . . . . . . . . .
Data Pump Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Directories and File Locations . . . . . . . . . . . . . . . . . . . . . . . . .
Direct Path or External Table Path? . . . . . . . . . . . . . . . . . . . . .
Exercise 18-2: Perform a Data Pump Export . . . . . . . . . . . .
Use Data Pump Export and Import to Move Data
Between Oracle Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Data Pump with the Command-Line Utilities . . . . . . .
Using Data Pump with Database Control . . . . . . . . . . . . . . . .
Exercise 18-3: Use Data Pump in Network Mode . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

636
636

639
642
644
647
647
648
649
650
651
652
652
653
654
655
657
658
660
661
662


Contents

19 Intelligent Infrastructure Enhancements

. . . . . . . . . . . 663

Use the Enterprise Manager Support Workbench . . . . . . . . . . . . . . . . .
The Automatic Diagnostic Repository (ADR) . . . . . . . . . . . .
Problems and Incidents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The ADR Command-Line Interface (ADRCI) . . . . . . . . . . . .
The Support Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 19-1: Use the Support Workbench . . . . . . . . . . . .
Manage Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Types of Patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Integration with MetaLink and the Patch Advisor . . . . . . . . .
Applying Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise 19-2: Download and Apply a Patch . . . . . . . . . . .
✓ Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Appendix

Index

665
665
666
666
666
669
670
670
671
672
677
679

680
681
682
683

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685

About the CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing and Running MasterExam . . . . . . . . . . . . . . . . . . . . . . . . . . .
MasterExam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Electronic Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Removing Installation(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LearnKey Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . .

Glossary

xix

686
686
686
686
687
687
687
687
687


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705


This page intentionally left blank


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.

xxi
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


The redo log stream
includes all changes: those applied to data

xxiii

segments and to undo segments, for both
committed and uncommitted transactions.

■ 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 productrelated 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.


✓■
Q&A ■

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.


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.
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.

■ Reread all the Exam Watch notes

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.

■ Retake the Self Tests

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.

■ Complete the Exercises

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.

■ Take the exam


×