high-performance oracle: proven methods for achieving ... · pdf filelibrary of congress...

15
Wiley Publishing, Inc. Geoff Ingram High-Performance Oracle ® Proven Methods for Achieving Optimum Performance and Availability

Upload: phungtram

Post on 16-Feb-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

  • Wiley Publishing, Inc.

    Geoff Ingram

    High-Performance Oracle

    Proven Methods for Achieving

    Optimum Performance and Availability

    200163_FM_Ingram 8/6/02 3:11 PM Page iii

    Innodata047143034X.jpg

  • 200163_FM_Ingram 8/6/02 3:11 PM Page vi

  • High-Performance Oracle

    Proven Methods for AchievingOptimum Performance and Availability

    200163_FM_Ingram 8/6/02 3:11 PM Page i

  • 200163_FM_Ingram 8/6/02 3:11 PM Page ii

  • Wiley Publishing, Inc.

    Geoff Ingram

    High-Performance Oracle

    Proven Methods for Achieving

    Optimum Performance and Availability

    200163_FM_Ingram 8/6/02 3:11 PM Page iii

  • Publisher: Robert IpsenExecutive Editor: Robert M. ElliottAssistant Editor: Emilie HermanManaging Editor: John AtkinsNew Media Editor: Brian SnappText Design & Composition: MacAllister Publishing Services, LLC

    Designations used by companies to distinguish their products are often claimed as trade-marks. In all instances where John Wiley & Sons, Inc., is aware of a claim, the product namesappear in initial capital or ALL CAPITAL LETTERS. Readers, however, should contact the appro-priate companies for more complete information regarding trademarks and registration.

    This book is printed on acid-free paper.

    Copyright 2002 by Geoff Ingram. All rights reserved.

    Published by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in Canada

    No part of this publication may be reproduced, stored in a retrieval system, or transmittedin any form or by any means, electronic, mechanical, photocopying, recording, scanning, orotherwise, except as permitted under Section 107 or 108 of the 1976 United States CopyrightAct, without either the prior written permission of the Publisher, or authorization throughpayment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rose-wood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470. Requests to the Pub-lisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc.,10475 Crosspointe Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, Email:[email protected].

    Limit of Liability/Disclaimer of Warranty: While the publisher and author have used theirbest efforts in preparing this book, they make no representations or warranties with respectto the accuracy or completeness of the contents of this book and specifically disclaim anyimplied warranties of merchantability or fitness for a particular purpose. No warranty maybe created or extended by sales representatives or written sales materials. The advice andstrategies contained herein may not be suitable for your situation. You should consult witha professional where appropriate. Neither the publisher nor author shall be liable for anyloss of profit or any other commercial damages, including but not limited to special, inci-dental, consequential, or other damages.

    For general information on our other products and services please contact our CustomerCare Department within the United States at (800) 762-2974, outside the United States at(317) 572-3993 or fax (317) 572-4002.

    Wiley also publishes its books in a variety of electronic formats. Some content that appearsin print may not be available in electronic books.

    Library of Congress Cataloging-in-Publication Data:Ingram, Geoff, 1962-

    High performance Oracle : proven methods for achieving optimumperformance and availability / Geoff Ingram.

    p. cm.Wiley Computer Publishing.Includes index.

    ISBN 0-471-22436-71. Oracle (Computer file) 2. Relational databases. 3. Software

    maintenance. I. Title.QA76.9.D3 I53422 2002005.75'85--dc21

    Printed in the United States of America.

    10 9 8 7 6 5 4 3 2 1

    200163_FM_Ingram 8/6/02 3:11 PM Page iv

  • This book is dedicated to my wife Renata; to my children Rosalind,Alexandra, Alice, and Sebastian; to my father Vincent;

    and to the memory of my mother Muriel.

    200163_FM_Ingram 8/6/02 3:11 PM Page v

  • 200163_FM_Ingram 8/6/02 3:11 PM Page vi

  • Acknowledgments

    Special thanks go to Mark Clark, whose vision ultimately made the book possible, andto Steve Shaw.

    Special thanks also go to Bob Elliott and Emilie Herman at Wiley Publishing, Inc.Bob turned the book proposal into something of a book in its own right. Hopefully theend result justifies that. Emilie, in her own words, edits with a heavy red pen, whichis not actually as painful as it sounds and has definitely led to more concise content,better organization, and improved readability. Thanks also to John Atkins for the finalpolish, and Brian Snapp.

    Honorable mentions go to colleagues and others, past and present, whose inputinfluenced the content in large and small ways. In no particular order: Wai Lee, GlenHowell, Sheck Cho, Chris Chandler, Nisit Kotecha, Anoop Marld, Richard Dutton,Arthur Muir, Susan Gruebel, Jose Garcia, Matt Solomon, Pradeep Malhotra, MichaelWang, Ping Huang, Anna Lam, Peter Chellone, Mike Bean, Tony Way, Andy Knight,Richard Kirkwood, Jenny Scott, Iain Beckingham, Carlos Tubau-Gamble, Simon Gre-gory, Adrian Cockcroft, and Ray Leah.

    Finally, thanks go to all those Oracle technologists, such as Thomas Kyte andJonathan Lewis, who contribute to bulletin boards and news groups on the Web, bothat Oracle and elsewhere. Without such people prepared to share their expertise free ofcharge, the Oracle world would be a much poorer place.

    200163_FM_Ingram 8/6/02 3:11 PM Page vii

  • 200163_FM_Ingram 8/6/02 3:11 PM Page viii

  • Contents

    Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

    Part One Fundamentals of an Oracle Configuration . . . . . . . . . . . 1

    Chapter 1 Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    The Oracle DBA Group Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    UNIX System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Oracle UNIX Account Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Oracle UNIX Memory Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 7Oracle UNIX Kernel Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 7Operating System Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Oracle Software Installation Directory . . . . . . . . . . . . . . . . . . . . . . . 7

    Installation of Oracle Software via NFS . . . . . . . . . . . . . . . . . . . . . 9Cloning the Installed Oracle Software . . . . . . . . . . . . . . . . . . . . . . . 13

    Performing a Silent Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Running Oracle Software over NFS . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Installing Client Software with Microsoft SystemsManagement Server (SMS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Using SMS Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Running Terminal Server Applications . . . . . . . . . . . . . . . . . . . . . . . 20

    Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    Chapter 2 Database Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    An Overview of Oracle File Types . . . . . . . . . . . . . . . . . . . . . . . . . 24Control Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    200163_FM_Ingram 8/6/02 3:11 PM Page ix

  • Online Redo Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Archived Redo Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Rollback Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Temporary Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    Traditional Oracle Physical Layout . . . . . . . . . . . . . . . . . . . . . . . . 28

    Oracle Layout for Manageability . . . . . . . . . . . . . . . . . . . . . . . . . . 28AUTOEXTEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Archive Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Database Restores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Database Backups and Exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Duplicate Databases on the Same Server . . . . . . . . . . . . . . . . . . . . . 29

    OMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Control Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Online Redo Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    Server Parameter Files (spfiles) . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Oracle Layout for Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . 38RAID Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Raw Partitions versus UNIX File Systems . . . . . . . . . . . . . . . . . . . . 41

    Tablespaces and Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    SANs and NAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .