ebook img

Beginning Oracle Database 11g administration: from novice to professional PDF

448 Pages·2012·5.59 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Beginning Oracle Database 11g administration: from novice to professional

Beginning Oracle Database 11g Administration From Novice to Professional Iggy Fernandez Beginning Oracle Database 11g Administration: From Novice to Professional Copyright © 2009 by Iggy Fernandez 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-10 (pbk): 1-59059-968-3 ISBN-13 (pbk): 978-1-59059-968-6 ISBN-13 (electronic): 978-1-4302-0628-6 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Jonathan Gennick Development Editor: Douglas Pundick Technical Reviewer: Bob Bryla Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Manager: Richard Dal Porto Copy Editors: Jim Compton, Sharon Wilkey Associate Production Director: Kari Brooks-Copony Production Editor: Kelly Gunther Compositor and Artist: Kinetic Publishing Services, LLC Proofreader: Nancy Sixsmith Indexer: Broccoli Information Management Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail (cid:107)(cid:110)(cid:96)(cid:97)(cid:110)(cid:111)(cid:41)(cid:106)(cid:117)(cid:60)(cid:111)(cid:108)(cid:110)(cid:101)(cid:106)(cid:99)(cid:97)(cid:110)(cid:41)(cid:111)(cid:94)(cid:105)(cid:42)(cid:95)(cid:107)(cid:105), or visit (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:111)(cid:108)(cid:110)(cid:101)(cid:106)(cid:99)(cid:97)(cid:110)(cid:107)(cid:106)(cid:104)(cid:101)(cid:106)(cid:97)(cid:42)(cid:95)(cid:107)(cid:105). For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail (cid:101)(cid:106)(cid:98)(cid:107)(cid:60)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105), or visit (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105). 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 (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105)(cid:43)(cid:101)(cid:106)(cid:98)(cid:107)(cid:43)(cid:94)(cid:113)(cid:104)(cid:103)(cid:111)(cid:93)(cid:104)(cid:97)(cid:111). The information in this book is distributed on an “as is” basis, without warranty. Although every precau- tion 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 indi- rectly by the information contained in this work. The source code for this book is available to readers at (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105). For Michelle. “Oh Fame!—if I e’er took delight in thy praises, ’Twas less for the sake of thy high-sounding phrases, Than to see the bright eyes of the dear one discover She thought that I was not unworthy to love her.” —Lord Byron And for all the IT colleagues and friends who, over the years, have asked me to teach them the basics of Oracle Database. Contents at a Glance Foreword ....................................................................... xvii About the Author ..................................................................xix About the Technical Reviewer ......................................................xxi Acknowledgments ...............................................................xxiii Introduction ..................................................................... xxv PART I Database Concepts (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 1 Relational Database Management Systems .......................3 CHAPTER 2 SQL and PL/SQL ................................................21 CHAPTER 3 Oracle Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 PART II Database Implementation (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 4 Planning .......................................................65 CHAPTER 5 Software Installation ...........................................81 CHAPTER 6 Database Creation .............................................95 CHAPTER 7 Physical Database Design .....................................131 CHAPTER 8 User Management and Data Loading ...........................151 iv PART III Database Support (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 9 Taking Control ................................................185 CHAPTER 10 Monitoring ....................................................201 CHAPTER 11 Fixing Problems ...............................................223 CHAPTER 12 Backups ......................................................255 CHAPTER 13 Recovery .....................................................279 CHAPTER 14 Database Maintenance ........................................305 CHAPTER 15 The Big Picture and the Ten Deliverables .......................331 PART IV Database Tuning (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 16 Instance Tuning ...............................................357 CHAPTER 17 SQL Tuning ...................................................381 INDEX .......................................................................417 v Contents Foreword ....................................................................... xvii About the Author ..................................................................xix About the Technical Reviewer ......................................................xxi Acknowledgments ...............................................................xxiii Introduction ..................................................................... xxv PART I Database Concepts (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 1 Relational Database Management Systems ................3 What Is a Database? ..............................................4 What Is a Relational Database? .....................................5 Definition of the Term Relation ................................5 Network Databases ..........................................6 Definition of a Relational Database .............................8 Relational Operators .........................................8 Structured Query Language ..................................11 Efficiency of Relational Operators .............................13 Query Optimization .........................................13 What Is a Database Management System? .........................14 Transaction Management ....................................15 Data Integrity ..............................................16 Data Security ..............................................17 What Makes a Relational Database Management System Relational? ..18 Summary .......................................................19 Exercises .......................................................19 Further Reading .................................................20 vii viii (cid:78)CONTENTS CHAPTER 2 SQL and PL/SQL .............................................21 Railroad Diagrams ...............................................23 Types of SQL ...................................................25 Data Definition Language ....................................26 Database Manipulation Language .............................26 Embedded SQL ..................................................29 SQL*Plus and SQL Developer .....................................30 Criticisms of SQL ................................................33 Duplicates .................................................33 Redundancy ...............................................33 Nullable Data Items .........................................36 Introduction to PL/SQL ...........................................38 Much Ado About Suppliers ...................................40 Summary .......................................................46 Exercises .......................................................48 Further Reading .................................................48 CHAPTER 3 Oracle Architecture .........................................51 Database vs. Instance ............................................53 Database .......................................................53 Software ..................................................53 Configuration Files ..........................................53 Data Files ..................................................54 Temporary Files ............................................55 Redo Log Files .............................................55 Archived Redo Log Files .....................................55 Control File ................................................56 Event Logs .................................................56 Database Backups ..........................................56 Instance ........................................................56 System Global Area .........................................56 Foreground Processes .......................................57 Background Processes ......................................58 (cid:78)CONTENTS ix Life Cycle of a Database Session ..................................59 Summary .......................................................60 Exercises .......................................................62 Further Reading .................................................62 PART II Database Implementation (cid:78)(cid:0)(cid:78)(cid:0)(cid:78) CHAPTER 4 Planning .....................................................65 Licensing .......................................................65 Practical Example ...........................................65 Free to Download, Free to Learn, Unlimited Evaluation ..........68 Database Editions ..........................................68 Architectural Choices ............................................70 Dedicated Server ...........................................70 Shared Server ..............................................70 Connection Pooling .........................................70 Real Application Clusters ....................................71 Standby Database ..........................................72 Maximum Available Architecture (MAA) ........................72 Sizing ..........................................................73 Disk Sizing .................................................74 Other Disk Considerations ...................................75 Memory Sizing .............................................76 CPU Sizing .................................................76 Network Sizing .............................................77 Summary .......................................................77 Exercises .......................................................78 Further Reading .................................................79 CHAPTER 5 Software Installation .......................................81 Oracle Technology Network .......................................81 The Forgotten Manuals ...........................................82 Prerequisites and Preinstallation Requirements ......................82 x (cid:78)CONTENTS Client Installations ...............................................83 Instant Client ...............................................83 Server Installations ..............................................87 Oracle Database Examples .......................................91 Perl ............................................................91 Summary .......................................................92 Exercises .......................................................93 Further Reading .................................................93 CHAPTER 6 Database Creation ..........................................95 Next-Next-Next; Click Finish ......................................96 Configuring a Listener ............................................97 Creating and Configuring a Database .............................101 The Welcome Screen ......................................102 Step 1: Operations .........................................102 Step 2: Database Templates ................................103 Step 3: Database Identification ..............................104 Step 4: Management Options ...............................105 Step 5: Database Credentials ................................106 Step 6: Storage Options ....................................107 Step 7: Database File Locations .............................108 Step 8: Recovery Configuration ..............................109 Step 9: Database Content ...................................110 Step 10: Initialization Parameters ............................111 Step 11: Security Settings ..................................112 Step 12: Automatic Maintenance Tasks ......................113 Step 13: Database Storage .................................114 Step 14: Creation Options ...................................115 Confirmation Screen .......................................116 Success Messages ........................................119 Post-Creation Tasks ............................................120 Other Methods of Database Creation ..............................120 Basic Database Administration Tasks .............................123 Summary ......................................................129 Exercises ......................................................129 Further Reading ................................................130

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.