Therefore, this book isdedicated to all the people along the way who took the time to teach me something.. No part of this book shall be reproduced, stored in a retrieval system, or tran
Trang 1SURVIVAL GUIDE
Joseph B Greene
Trang 2I came into this world knowing nothing Therefore, this book is
dedicated to all the people along the way who took the time to teach
me something
C OPYRIGHT © 1995 BY S AMS P UBLISHING
FIRST EDITION
All rights reserved No part of this book shall be reproduced, stored
in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without written
permission from the publisher No patent liability is assumed with
respect to the use of the information contained herein Although
every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or
omissions Neither is any liability assumed for damages resulting
from the use of the information contained herein For information,
address Sams Publishing, 201 W 103rd St., Indianapolis, IN 46290
International Standard Book Number: 0-672-30681-6
Library of Congress Catalog Card Number: 95-67649
98 97 96 95 4 3 2 1
Interpretation of the printing code: the rightmost double-digit
number is the year of the book’s printing; the rightmost single-digit,
the number of the book’s printing For example, a printing code of
95-1 shows that the first printing of the book occurred in 1995
Composed in New Century Schoolbook and MCPdigital by
Macmillan Computer Publishing
Printed in the United States of America
All terms mentioned in this book that are known to be trademarks
or service marks have been appropriately capitalized Sams
Publishing cannot attest to the accuracy of this information Use of
a term in this book should not be regarded as affecting the validity
of any trademark or service mark
ACQUIS ITI ON S EDIT OR
Rosemarie Graham
DEVELOP MENT EDI TOR
Todd Bumbalough
SOFT WARE DEVELOPMEN T
SP E C I A L I S T
Steve Flatt
PRO D UCT IO N ED I TO R
Nancy Albright
TECHNICAL REVIEWER
Byron Pearce Mark Gokman
ED I TO RI AL CO O RDI N ATO R
Bill Whitmer
TECHNICAL EDIT
CO O R D I N A T O R
Lynette Quinn
FO R M A T T E R
Frank Sinclair
COVER DESIGN ER
Tim Amrhein
BOOK DESIGNER
Alyssa Yesh
PRODUCT ION TEAM
SU P E R V I S O R
Brad Chinn
PAGE LAYOUT
Louisa Klucznik Brian-Kent Proffitt Tina Trettin Susan Van Ness
PR O O F R E A D I N G
Nancy Price Brian-Kent Proffitt Erich Richter Susan D Van Ness Paul Wilson
IN D E X E R
Cheryl Dietsch
PRESIDENT AND PUBLISHER Richard K Swadley
ACQUISITIONS MANAGER Greg Wiegand
DEVELOPMENT MANAGER Dean Miller
MANAGING EDITOR Cindy Morrow
MARKETING MANAGER Gregg Bushyeager
Trang 3PART I THE JOB OF THE ORACLE DBA
1 The World of a Database Administrator 3
2 The Database Administrator’s Job Description 13
3 History and Development of Databases and Oracle 43
PART II UNDERSTANDING HOW ORACLE WORKS
PART III INSTALLING AND UPGRADING THE ORACLE SOFTWARE
15 The Life Cycle of an Oracle Database 251
16 Choosing Products and the Environment for
17 Planning an Oracle Installation 277
PART IV DEVELOPING A DATABASE ADMINISTRATION SCHEME
Trang 4PART V THE DAILY ROUTINE
PART VI MONITORING THE DATABASE’S HEALTH
PART VII DEALING WITH PROBLEMS
36 Instance and Application Crashes 563
37 When the Database Is Too Slow 575
PART VIII SUPPORTING USERS AND DEVELOPERS
PART IX ADVANCED ORACLE TECHNICAL FEATURES
45 Packages, Procedures, and Triggers 663
48 Oracle Workgroup Server and Oracle 7.2 687
Trang 5G Where to Get More Information 725
H Sample System Configuration Analyses 727
Trang 6planning, 258-259
README file, 312-315
storing new
software, 314
support, 318
testing, 316
troubleshooting,
325-326
UPS (uninterruptable
power supplies), 270
USE_MERGE hint, 623
USE_NL hint, 623
user account
mainte-nance, 394-408
adding new users, 399-402
changing privileges,
402-406
deleting user accounts,
406-407
granting privileges,
400-402
group accounts, 398
operating system logon
IDs, 396-399
passwords, 402
security schemes, 394-396
SQL*Net, 398
temporarily disabling
users, 407
users
administration (DBA job
description), 21, 28-32
expectations (database
speed), 578-579
future requirements
planning database
expansion, 520-522
groups (DBA continuing
education), 637-638
privileges, 177-178
requirements (database administration schemes), 335-336
server processes (Oracle), 101 service processes, 138-139 sessions, killing user sessions (SQL*DBA), 713 support
(DBA job description),
21, 28, 39-42 DBA daily routine overview, 387-388
User Manager, 65, 86
util_ck.sql script, 735 utilities, 63-65
at utility (UNIX), 374 Backup Manager, 64, 83-84
cron utility (UNIX), 374-377
Database Expander, 64, 85-86
Database Manager, 64, 83 Export, 63, 78, 90-91, 227, 238-239, 721
example, 721-722 selecting backup schemes, 241
Import, 63, 78, 90-91, 703, 720-723
command line mode, compared to interac-tive mode, 720 example, 722-723 parameters, 720-721
job submission utilities (database administration schemes), 373-377 Object Manager, 65, 86
Oracle Network Manager, 63-64
Oracle Terminal, 63 Password Manager, 64, 84 Recovery Manager, 65, 86-87
Server Manager, 81-82 Session Manager, 64, 83 SQL*DBA, 63, 78, 78-81,
703, 712-713
command line mode, 712 compared to SQL*Plus, 709
executing scripts, 370-371 functions, 80-81 killing user sessions, 713 menu mode, 712 monitor locks option, 653-654
monitoring capabilities, 713
SQL*Loader, 63, 78, 91-92, 716-717
badfile optional param-eter, 717
example control file, 717 fixed column
formats, 716 load tables, 716 log file optional param-eter, 717
population scripts, 716
SQL*Net, 64
listeners, 150 listeners process, 290 log files, 135
multi-threaded servers,
Trang 7SQL*Plus, 61-62, 78,
88-90, 703, 706-709
calling, 706
compared to SQL*DBA,
709
executing shell scripts,
370-373
formatting columns, 89
output formatting,
706-708
reports, 367-369
scripts, 708-709
trace utility (optimizing
queries), 624-625
User Manager, 65, 86
utilization report
monitoring databases, 452,
462-465
troubleshooting
tablespaces, 548-551
V
varchar2 data type, 161
variables, environmental
variables, shell scripts,
371
VAX system, configura-tion, 271
vendor training pro-grams, 632-634 vendors
purchasing products, 274-276
technical support, 30-31
views, 158, 164-166,
424, 596
auditing databases, 482, 490-491
compared to summary calculation tables, 606 creating, 165
designing tables for decision support, 600-601 monitoring tablespaces, 416-418
privilege sets, 403-406 privileges, 194, 197-198 querying about privileges, 207-208
synonyms, 166-167
virtual memory, 111
W
warm backups, 226, 236-238
database administration schemes, 343
ending, 237 selecting backup schemes, 240-241
starting, 236
whenever clause (auditing databases), 489
white papers, 30 Windows, Oracle 7 pro-cesses, 151
Workgroups Server, 688-690
World Wide Web (WWW)
DBA continuing education, 636-637
technical support, 543
writing to data files, 101
X–Y–Z
X locks, 652