Books for professionals By professionals® The eXperT’s Voice® in oracle Companion eBook Available Pro Oracle Database 11g RAC Covers 11g Release 2 Pro on Linux O Dear Reader, r a You are holding in your hands the result of our experience and best-thinking when c Pro Steve Shaw, Author of it comes to installing, configuring, and tuning Oracle Database 11g RAC on Linux. l Pro Oracle Database 10g Real Application Clusters, or RAC as it is commonly called, is Oracle’s industry- e leading architecture for building scalable and fault-tolerant databases. RAC pro- RAC on Linux vides redundancy through multiple servers, allowing you to scale up and down D Oracle Database 11g simply by adding or subtracting servers. a Using practical examples and illustrations we take you through all the stages of building the infrastructure for the latest 11g Release 2 clustered environments t a from selecting the right hardware components to installing and configuring Oracle Enterprise Linux. We detail how to install and configure Oracle VM—Oracle’s b own virtualization solution—to enable anyone to begin working with Oracle RAC a RAC on Linux straight away. We show the spectrum of configurations from single server to a fully s virtualized RAC implementation. e Building upon the Linux foundation, you will see how to successfully imple- ment Oracle’s Grid infrastructure and RAC database software even when upgrad- Martin Bach 1 ing from an Oracle Database 10g release. You will also learn how to manage and monitor your new clustered installation through workload management and per- 1 formance monitoring, and parallel execution. g Installation, Administration, Performance We make no assumptions on your experience with Oracle 11g RAC Release 2, or with Linux. Our goal in this book is to provide a complete reference to all of the R information you will need, beginning with the essential grounding of concepts and A architecture. We have comprehensively researched, tested, and detailed every step of the process so this book can be your guide to taking the next step in the evolu- C tion of grid and cloud computing with Oracle 11g Release 2 RAC on Linux. o Steve Shaw & Martin Bach Create robust and scalable database systems n Companion eBook using Oracle’s clustering and grid technologies THE APRESS ROADMAP L Beginning Pro Pro i Oracle Database 11g Oracle Database 11g Oracle Database 11g n Administration Administration RAC on Linux u x Beginning Pro Expert Oracle SQL Oracle SQL Oracle Practices SOURCE CODE ONLINE Steve Shaw and Martin Bach S B www.apress.com h a a c w h US $59.99 Shelve in: Databases / Oracle User level: Intermediate–Advanced Pro Oracle Database 11g RAC on Linux Steve Shaw Martin Bach Pro Oracle Database 11g RAC on Linux Copyright © 2010 by Steve Shaw and Martin Bach All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2958-2 ISBN-13 (electronic): 978-1-4302-2959-9 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. President and Publisher: Paul Manning Lead Editor: Jonathan Gennick Technical Reviewer: Bernhard Cock Buning and Sandesh Rao Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Anita Castro Copy Editor: Patrick Meader and Mary Ann Fugate Compositor: Bytheway Publishing Services Indexer: BIM Indexing & Proofreading Services Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer- sbm.com, or visit www.springeronline.com. For information on translations, please e-mail [email protected], or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. CONTENTS AT A GLANCE Contents at a Glance About the Author..................................................................................................xxi About the Technical Reviewer............................................................................xxii Acknowledgments.............................................................................................xxiii Chapter 1: Introduction...........................................................................................1 Chapter 2: RAC Concepts......................................................................................27 Chapter 3: RAC Architecture.................................................................................63 Chapter 4: Hardware.............................................................................................97 Chapter 5: Virtualization.....................................................................................165 Chapter 6: Linux Installation and Configuration.................................................231 Chapter 7: Grid Infrastructure Installation.........................................................323 Chapter 8: Clusterware.......................................................................................379 Chapter 9: Automatic Storage Management.......................................................455 Chapter 10: RDBMS Installation and Configuration............................................505 Chapter 11: Workload Management...................................................................559 Chapter 12: Oracle Performance Monitoring......................................................607 Chapter 13: Linux Performance Monitoring........................................................653 Chapter 14: Parallel Execution ...........................................................................687 Chapter 15: Upgrading to Oracle 11g Release 2.................................................717 Index...................................................................................................................771 iii CONTENTS Contents About the Authors................................................................................................xxi About the Technical Reviewers..........................................................................xxii Acknowledgments.............................................................................................xxiii Chapter 1: Introduction...........................................................................................1 Introducing Oracle Real Application Clusters....................................................................1 Examining the RAC Architecture........................................................................................3 Deploying RAC...................................................................................................................4 Maintaining High Availability....................................................................................................................5 Defining Scalability...................................................................................................................................6 Scaling Vertically vs. Horizontally.............................................................................................................7 Increasing Manageability.........................................................................................................................8 Assessing the Cost of Ownership...........................................................................................................10 Clustering with Oracle on Linux.......................................................................................13 Running Linux on Oracle..................................................................................................16 Understanding the Role of Unix..............................................................................................................16 Liberating Software................................................................................................................................17 Developing Linux....................................................................................................................................18 Expanding the Concept of Free with Open Source.................................................................................19 Combining Oracle, Open Source, and Linux....................................................................20 Drilling Down on Unbreakable Linux......................................................................................................21 Creating and Growing Red Hat Enterprise Linux....................................................................................22 Extending Red Hat with Oracle Enterprise Linux....................................................................................23 Drilling Down on SuSE Linux Enterprise Server.....................................................................................24 iv CONTENTS Taking Linux to Asia...............................................................................................................................25 Summary.........................................................................................................................25 Chapter 2: RAC Concepts......................................................................................27 Clustering Concepts.........................................................................................................27 Configuring Active/active Clusters.........................................................................................................27 Implementing Active/passive Clusters...................................................................................................28 Configuring a Shared-All Architecture....................................................................................................28 Configuring a Shared-Nothing Architecture...........................................................................................29 Exploring the Main RAC Concepts...................................................................................29 Working with Cluster Nodes...................................................................................................................29 Leveraging the Interconnect...................................................................................................................30 Clusterware/Grid Infrastructure..............................................................................................................31 Leveraging Automatic Storage Management.........................................................................................39 Installing Real Application Clusters........................................................................................................44 Using the Global Resource Directory (GRD)............................................................................................49 Transferring Data Between Instances with Cache Fusion......................................................................51 Achieving Read Consistency...................................................................................................................52 Synchronizing System Change Numbers...............................................................................................52 Exploring the New Features of 11g Release 2.................................................................52 Leveraging Grid Plug and Play................................................................................................................53 Modeling Resources with Server Pools..................................................................................................55 Ensuring POSIX Compliance with ACFS..................................................................................................56 Using Oracle Restart Instead of RAC......................................................................................................57 Simplifying Clusterd Database Access with SCAN Listener...................................................................59 Summary.........................................................................................................................60 Chapter 3: RAC Architecture.................................................................................63 Availability Considerations...............................................................................................63 Deciding the Number of Nodes...............................................................................................................65 v CONTENTS Online Maintenance and Patching..........................................................................................................67 Instance Recovery in RAC.......................................................................................................................72 Failover Considerations...................................................................................................74 Transparent Application Failover............................................................................................................75 Fast Connection Failover and Fast Application Notification...................................................................76 Scalability Considerations...............................................................................................77 Scalability Enhancers.............................................................................................................................78 Scalability Inhibitors...............................................................................................................................79 Standby Databases..........................................................................................................81 Introduction to Oracle Standby Databases.............................................................................................82 Types of Standby Database....................................................................................................................83 Active Data Guard...................................................................................................................................85 Extended Distance Clusters....................................................................................................................90 Oracle Streams................................................................................................................91 Streams Processing................................................................................................................................92 Oracle Streams Prerequisites.................................................................................................................93 Cluster Topologies...........................................................................................................94 Summary.........................................................................................................................95 Chapter 4: Hardware.............................................................................................97 Oracle Availability............................................................................................................98 Server Processor Architecture.........................................................................................99 x86 Processor Fundamentals.................................................................................................................99 Multicore Processors and Hyper-Threading.........................................................................................103 CPU Cache............................................................................................................................................106 CPU Power Management......................................................................................................................109 Virtualization.........................................................................................................................................111 Memory..........................................................................................................................112 Virtual Memory.....................................................................................................................................112 vi CONTENTS Physical Memory..................................................................................................................................113 NUMA....................................................................................................................................................116 Memory Reliability................................................................................................................................125 Additional Platform Features.........................................................................................125 Onboard RAID Storage..........................................................................................................................126 Machine Check Architectures...............................................................................................................126 Remote Server Management and IPMI.................................................................................................127 Network Interconnect Technologies..............................................................................127 Server I/O..............................................................................................................................................128 Private Interconnect.............................................................................................................................131 Storage Technologies....................................................................................................136 RAC I/O Characteristics........................................................................................................................137 Hard Disk and Solid State Disk Drive Performance..............................................................................143 RAID......................................................................................................................................................147 Storage Protocols for Linux..................................................................................................................153 Summary.......................................................................................................................164 Chapter 5: Virtualization.....................................................................................165 Virtualization Definition and Benefits.............................................................................165 Oracle VM......................................................................................................................168 Oracle VM Server Architecture.............................................................................................................168 Oracle VM Design.................................................................................................................................174 Oracle VM Server Installation........................................................................................178 Oracle VM Manager Installation.....................................................................................183 Oracle VM CLI Installation and Configuration................................................................186 Configuring Oracle VM...................................................................................................187 Network Configuration..........................................................................................................................187 Server Pool Configuration.....................................................................................................................192 Installing and Configuring Guests..................................................................................208 vii CONTENTS Importing a Template...........................................................................................................................209 Creating a Guest from a Template........................................................................................................210 Accessing a Guest................................................................................................................................212 Configuring a Guest for RAC.................................................................................................................214 Managing Domains........................................................................................................216 Oracle VM Agent...................................................................................................................................216 Oracle VM Manager..............................................................................................................................218 Oracle VM Manager CLI........................................................................................................................220 The xm Command-Line Interface.........................................................................................................222 Summary.......................................................................................................................230 Chapter 6: Linux Installation and Configuration.................................................231 Selecting the Right Linux Software...............................................................................231 Reviewing the Hardware Requirements........................................................................232 Drilling Down on Networking Requirements..................................................................233 Configuring a GNS or a Manual IP........................................................................................................233 Configuring DNS and DHCP..................................................................................................................236 Downloading the Linux Software...................................................................................243 Preparing for a Network Install......................................................................................243 Installing Oracle Enterprise Linux 5...............................................................................247 Starting the Installation........................................................................................................................247 Installation Media Check......................................................................................................................247 Anaconda Installation...........................................................................................................................247 Install or Upgrade.................................................................................................................................248 Disk Partitioning...................................................................................................................................248 Configuring the Boot Loader and Network...........................................................................................259 Selecting a Time Zone..........................................................................................................................260 Configuring the Root Password............................................................................................................261 Reviewing the Package Installation Defaults.......................................................................................261 viii
Description: