Oracle Essentials Oracle Database 11g Other Oracle resources from O’Reilly Related titles Mastering Oracle SQL Optimizing Oracle Performance Oracle Application Server 10g Essentials Oracle DBA Pocket Guide Oracle in a Nutshell Oracle PL/SQL Programming Oracle SQL*Plus: The Defini- tive Guide Oracle Books Resource Center oracle.oreilly.com is a complete catalog of O’Reilly’s books on Oracle and related technologies, including sample chapters and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. Oracle Essentials Oracle Database 11g FOURTH EDITION Rick Greenwald, Robert Stackowiak, and Jonathan Stern Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Oracle Essentials: Oracle Database 11g, Fourth Edition by Rick Greenwald, Robert Stackowiak, and Jonathan Stern Copyright © 2008 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editors: Colleen Gorman and Deborah Russell Production Editor: Sumita Mukherji Production Services: Tolman Creek Design Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Robert Romano Printing History: October 1999: First Edition. Originally published under the title Oracle Essentials: Oracle8 and Oracle8i June 2001: Second Edition. Originally published under the title Oracle Essentials: Oracle9i, Oracle8i and Oracle8 February 2004: Third Edition. Originally published under the title Oracle Essentials: Oracle Database 10g November 2007: Fourth Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Oracle Essentials: Oracle Database 11g, the image of cicadas, and related trade dress are trademarks of O’Reilly Media, Inc. Oracle ® and all Oracle-based trademarks and logos are trademarks or registered trademarks of Oracle Corporation, Inc. in the United States and other countries. O’Reilly Media, Inc. is independent of Oracle Corporation. Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. O’Reilly Media, Inc. is independent of Sun Microsystems. .NET is a registered trademark of Microsoft Corporation. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. This book uses RepKover ™ , a durable and flexible lay-flat binding. ISBN-10: 0-596-51454-9 ISBN-13: 978-0-596-51454-9 [M] In memory of Jonathan vii Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 1. Introducing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 The Evolution of the Relational Database 2 The Oracle Database Family 7 Summary of Oracle Database Features 9 Database Application Development Features 9 Database Connection Features 13 Distributed Database Features 17 Data Movement Features 18 Database Performance Features 20 Database Management Features 23 Database Security Features 27 Oracle Development Tools 28 Embedded Databases 31 2. Oracle Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Databases and Instances 33 Deploying Physical Components 38 Instance Memory and Processes 48 The Data Dictionary 54 3. Installing and Running Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Installing Oracle 56 Creating a Database 59 Configuring Oracle Net 63 viii | Table of Contents Starting Up the Database 68 Shutting Down the Database 69 Accessing a Database 70 Oracle at Work 77 4. Oracle Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Datatypes 82 Basic Data Structures 90 Additional Data Structures 98 Extended Logic for Data 100 Data Design 102 Constraints 104 Triggers 107 Query Optimization 108 Understanding the Execution Plan 118 SQL Advisors 120 Data Dictionary Tables 120 5. Managing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Manageability Features 124 Oracle Enterprise Manager 126 Fragmentation and Reorganization 132 Backup and Recovery 133 Working with Oracle Support 137 6. Oracle Security, Auditing, and Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Security 139 Auditing 150 Compliance 151 7. Oracle Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Performance Tuning Basics 154 Oracle and Disk I/O Resources 160 Oracle and Parallelism 169 Oracle and Memory Resources 176 Oracle and CPU Resources 182 Database Resource Manager 184 Table of Contents | ix 8. Oracle Multiuser Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Basics of Concurrent Access 187 Oracle and Concurrent User Access 190 Oracle’s Isolation Levels 191 Oracle Concurrency Features 192 How Oracle Handles Locking 194 Concurrent Access and Performance 197 Workspaces 198 9. Oracle and Transaction Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 OLTP Basics 201 Oracle’s OLTP Heritage 205 Architectures for OLTP 206 Oracle Features for OLTP 211 High Availability 217 Oracle Streams and Advanced Queuing 218 Object Technologies and Distributed Components 221 10. Oracle Data Warehousing and Business Intelligence . . . . . . . . . . . . . . . . . . . 222 Business Intelligence Basics 223 Data Warehouse Design 227 Query Optimization 230 Analytics, OLAP, and Data Mining in the Database 233 Managing the Data Warehouse 236 Other Software for the Data Warehouse 236 The Metadata Challenge 248 Best Practices 249 11. Oracle and High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 What Is High Availability? 254 System Failure 257 Protecting Against System Failure 262 Recovering from Failures 275 Complete Site Failure 281 Data Redundancy Solutions 285 Rolling Upgrades 289 [...]... applications and business intelligence offerings 2007 Oracle Database 11g: extension of self-managing capabilities and end-to-end database change management; Hyperion acquisition adds database- independent OLAP and Financial Performance Management applications The Oracle Database Family Oracle Database 11g is the most recent version of the Oracle Relational Database Management System (RDBMS) family of products... releases that also add features but are more typically focused on improvements to earlier capabilities The terms Oracle, ” Oracle8 ,” Oracle8 i,” Oracle9 i,” Oracle Database 10g,” and Oracle Database 11g might appear to be used somewhat interchangeably in this book because Oracle Database 11g includes all the features of previous versions When we describe a new feature that was first made available... buck About the Fourth Edition (Oracle Database 11g) The first three editions of this book, covering the Oracle database up to the Oracle Database 10g version, have been well received, and we were pleased that O’Reilly Media agreed to publish this fourth edition In this update to the book, we have added information describing the latest release of Oracle, Oracle Database 11g For the most part, the task... to Oracle Standard Edition The Oracle Database Family | 7 Oracle Personal Edition Database used by single developers to develop code for implementation on Oracle multiuser databases It requires a license, unlike Express Edition, but gives you the full Enterprise Edition set of functionality Oracle Express Edition Entry-level database from Oracle available at no charge for Windows and Linux This database. .. and shut down the database and Oracle Net Chapter 4, Oracle Data Structures, summarizes the various datatypes supported by Oracle and introduces the Oracle objects (e.g., tables, views, indexes) This chapter also covers query optimization Chapter 5, Managing Oracle, provides an overview of managing an Oracle system, including the advisors available as part of Oracle Database 11g, using Oracle Enterprise... In 1998, Oracle announced Oracle8 i, with the “i” added to denote new functionality supporting Internet deployment Oracle9 i continued using this theme In 2003, Oracle released Oracle Database 10g, with the “g” denoting Oracle s focus on emerging grid computing deployment models Oracle has continued that theme in the current database version highlighted in this book In between major versions, Oracle issues... store objects in the database • Oracle8 i (released in 1999) added a new twist to the Oracle database a combination of enhancements that made the Oracle8 i database a focal point in the world of Internet computing • Oracle9 i (released in 2001) introduced Real Application Clusters as a replacement for Oracle Parallel Server and added many management and data warehousing features • Oracle Database 10g (released... Application Server Database Networking Database users connect to the database by establishing a network connection You can also link database servers via network connections Oracle provides a number of features to establish connections between users and the database and/or between database servers, as described in the following subsections Oracle Net Oracle s network interface, Oracle Net, was formerly... toolset, read consistency 1986 Oracle version 5 generally available: client/server Oracle relational database 1987 CASE and 4GL toolset 1988 Oracle Financial Applications built on relational database 1989 Oracle6 generally available: row-level locking and hot backups 1991 Oracle Parallel Server on massively parallel platforms 1993 Oracle7 : with cost-based optimizer 1994 Oracle version 7.1 generally available:... create index 1996 Universal database with extended SQL via cartridges, thin client, and application server 1997 Oracle8 generally available: object-relational and Very Large Database (VLDB) features 1999 Oracle8 i generally available: Java Virtual Machine (JVM) in the database 2000 Oracle9 i Application Server generally available: Oracle tools integrated in middle tier 2001 Oracle9 i Database Server generally . Oracle Essentials Oracle Database 11g Other Oracle resources from O’Reilly Related titles Mastering Oracle SQL Optimizing Oracle Performance Oracle. title Oracle Essentials: Oracle8 and Oracle8 i June 2001: Second Edition. Originally published under the title Oracle Essentials: Oracle9 i, Oracle8 i and Oracle8