1. Trang chủ
  2. » Công Nghệ Thông Tin

pro oracle databasea 11g administration

721 1,6K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 721
Dung lượng 8,61 MB

Nội dung

this print for content only—size & color not accurate 7.5 x 9.25 spine = 1.34375" 720 page count PPI = 534 Kuhn Oracle Database 11g Administration THE EXPERT’S VOICE ® IN ORACLE Pro Oracle Database 11g Administration CYAN MAGENTA YELLOW BLACK PANTONE 123 C Darl Kuhn Companion eBook Available Effectively manage and safeguard your organization's data BOOKS FOR PROFESSIONALS BY PROFESSIONALS ® US $59.99 Shelve in: Databases / Oracle User level: Intermediate–Advanced THE APRESS ROADMAP Troubleshooting Oracle Performance Expert Oracle Practices Pro Oracle Database 11g Administration RMAN Recipes for Oracle Database 11g Beginning Oracle Database 11g Administration www.apress.com Companion eBook See last page for details on $10 eBook version ISBN 978-1-4302-2970-4 9 781430 229704 55999 Pro Covers 11g Release 2! Pro Oracle Database 11g Administration Pro Oracle Database 11g Administration is a task-oriented guide to managing complex database environments using Oracle Database 11g. Author Darl Kuhn draws from a well of experience over a decade deep to lay out real-world tech- niques leading to success as an Oracle database administrator (DBA). He gives clear explanations on how to perform critical tasks. He weaves in theory where necessary without bogging you down in unneeded detail. Darl is not afraid to take a stand on how things should be done. He won’t leave you adrift in a sea of choices, showing you three ways to do something and then walking away. Pro Oracle Database 11g Administration condenses and organizes the core job of a database administrator into one volume. You get strong coverage of fun- damentals such as software installation, database and schema creation, backup and recovery, and more. That coverage is informed by the author’s experience of being asked to manage increasing numbers of databases in the same amount of time. For example, Chapter 1 provides excellent coverage of silent installs, enabling you to repeat the same Oracle binary install across many servers with- out having to run the GUI installer interactively each time. Database administration isn’t about passing a certified exam, or about point- ing-and-clicking your way through a crisis. Database administration is about applying the right solution at the right time. It’s about avoiding risk and making robust choices that get you home each night in time for dinner with your fam- ily. If you have “buck stops here” responsibility for an Oracle database, then Pro Oracle Database 11g Administration is the book you need to elevate yourself to the level of Professional Oracle Database Administrator. Darl Kuhn, Author of Linux Recipes for Oracle DBAs RMAN Recipes for Oracle Database 11g Oracle SQL Recipes Download from Wow! eBook <www.wowebook.com> i Pro Oracle Database 11g Administration ■ ■ ■ Darl Kuhn ii Pro Oracle Database 11g Administration Copyright © 2010 by Darl Kuhn 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-2970-4 ISBN-13 (electronic): 978-1-4302-2971-1 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: Bernard Lopuz Editorial Board: 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 Editors: Mary Behr and Tiffany Taylor Compositor: MacPS, LLC 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 rights@apress.com 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. iii To Heidi, Brandi, and Lisa. iv Contents at a Glance ■ Contents v ■ About the Author xxix ■ About the Technical Reviewer xxx ■ Acknowledgments xxxi ■ Introduction xxxii ■ Chapter 1: Installing the Oracle Binaries 1 ■ Chapter 2: Implementing a Database 25 ■ Chapter 3: Configuring an Efficient Environment 51 ■ Chapter 4: Tablespaces and Datafiles 71 ■ Chapter 5: Managing Control Files and Online Redo Logs 91 ■ Chapter 6: Users and Basic Security 111 ■ Chapter 7: Tables and Constraints 133 ■ Chapter 8: Indexes 171 ■ Chapter 9: Views, Synonyms, and Sequences 193 ■ Chapter 10: Data Dictionary Basics 213 ■ Chapter 11: Large Objects 243 ■ Chapter 12: Partitioning: Divide and Conquer 269 ■ Chapter 13: Data Pump 307 ■ Chapter 14: External Tables 345 ■ Chapter 15: Materialized Views 361 ■ Chapter 16: User-Managed Backup and Recovery 413 ■ Chapter 17: Configuring RMAN 457 ■ Chapter 18: RMAN Backups and Reporting 487 ■ Chapter 19: RMAN Restore and Recovery 509 ■ Chapter 20: Oracle Secure Backup 545 ■ Chapter 21: Automating Jobs 569 ■ Chapter 22: Database Troubleshooting 595 ■ Index 637 v Contents ■ Contents at a Glance iv ■ About the Author xxix ■ About the Technical Reviewer xxx ■ Acknowledgments xxxi ■ Introduction xxxii ■ Chapter 1: Installing the Oracle Binaries 1 Understanding the Optimal Flexible Architecture 1 Oracle Inventory Directory 3 Oracle Base Directory 3 Oracle Home Directory 3 Oracle Network Files Directory 4 Automatic Diagnostic Repository 4 Installing Oracle 4 Step 1. Create the Operating System Group and User 5 Step 2. Ensure That the Operating System Is Adequately Configured 6 Step 3. Obtain the Oracle Installation Software 7 Step 4. Unzip the Files 7 Step 5. Configure the Response File, and Run the Installer 8 Step 6. Troubleshoot Any Issues 11 Installing with a Copy of an Existing Installation 12 Step 1. Copy the Binaries Using an Operating System Utility 13 Step 2. Attach the Oracle Home 14 ■ CONTENTS vi Upgrading Oracle Software 15  Reinstalling After Failed Installation 16  Applying Interim Patches 17  Installing Remotely with the Graphical Installer 18 Step 1. Install X Software and Networking Utilities on the Local PC 19 Step 2. Start an X Session on the Local Computer 19 Step 3. Copy the Oracle Installation Media to the Remote Server 20 Step 4. Run the xhost Command 21 Step 5. Log In to the Remote Computer from X 21 Step 6. Ensure that the DISPLAY Variable Is Set Correctly on the Remote Computer 21 Step 7. Execute the runInstaller Utility 22 Step 8. Troubleshoot 22 Summary 23 ■ Chapter 2: Implementing a Database 25 Setting Operating System Variables 25 A Manually Intensive Approach 26 Oracle’s Approach to Setting OS Variables 26 My Approach to Setting OS Variables 27 Creating a Database 29 Step 1. Set the Operating System Variables 29 Step 2: Configure the Initialization File 30 Step 3: Create the Required Directories 32 Step 4: Create the Database 32 Step 5. Create a Data Dictionary 36 Configuring and Implementing the Listener 37 Creating a Password File 39 Starting and Stopping the Database 40 Understanding Authentication 41 Starting the Database 41 ■ CONTENTS vii Stopping the Database 43  Using a Response File to Create a Database 45  Dropping a Database 46  How Many Databases on One Server? 47 Summary 50 ■ Chapter 3: Configuring an Efficient Environment 51 Customizing Your Operating System Command Prompt 52 Customizing Your SQL Prompt 54 Creating Shortcuts for Frequently Used Commands 55 Using Aliases 55 Using a Function 56 Rerunning Commands Quickly 57 Scrolling with the Up and Down Arrow Keys 58 Pressing Ctrl+P and Ctrl+N 58 Listing the Command History 58 Searching in Reverse 59 Setting the Command Editor 59 Developing Standard Scripts 60 dba_setup 60 dba_fcns 61 tbsp_chk.bsh 62 conn.bsh 64 filesp.bsh 65 login.sql 66 top.sql 66 lock.sql 67 users.sql 67 Organizing Scripts 68 Step 1: Create Directories 68 ■ CONTENTS viii Step 2: Copy Files to Directories 69  Step 3: Configure the Startup File 69  Summary 70  ■ Chapter 4: Tablespaces and Datafiles 71 Understanding the First Five 72 Understanding the Need for More 72 Creating Tablespaces 73 Renaming a Tablespace 76 Controlling the Generation of Redo 76 Changing a Tablespace’s Write Mode 77 Dropping a Tablespace 78 Using Oracle Managed Files 80 Creating a Bigfile Tablespace 81 Displaying Tablespace Size 81 Altering Tablespace Size 82 Toggling Datafiles Offline and Online 83 Renaming or Relocating a Datafile 85 Summary 90 ■ Chapter 5: Managing Control Files and Online Redo Logs 91 Managing Control Files 91 Viewing Control File Names and Locations 93 Adding a Control File 94 Moving a Control File 96 Removing a Control File 97 Managing Online Redo Logs 98 Displaying Online Redo-Log Information 100 Determining the Optimal Size of Online Redo-Log Groups 102 Determining the Optimal Number of Redo-Log Groups 103 [...]... analyst at Oracle Corporation Download from Wow! eBook since 2001, and he is an Oracle Certified Professional (OCP) Before he became an Oracle DBA, he was a programmer developing Unisys Linc and Oracle applications as well as interactive voice response (IVR) applications such as telephone banking voice-processing applications Bernard was coauthor of the Linux Recipes for Oracle DBAs... DBA working for Oracle Corporation He has coauthored four other books: Oracle SQL Recipes (Apress, 2009), Linux Recipes for Oracle DBAs (Apress, 2009), RMAN Recipes for Oracle Database 11g (Apress, 2008), and Oracle RMAN Pocket Reference (O’Reilly Media, 2001) He also teaches advanced database courses at Regis University Darl does volunteer DBA and developer work for the Rocky Mountain Oracle Users Group... use Oracle technology At the heart of this technology is an Oracle database Businesses use this technology to store and manage mission critical data This information is the basis for making intelligent business decisions Companies that effectively transform data into intelligence quickly gain a competitive edge in the market place Oracle DBAs play a pivotal role with implementing and leveraging Oracle. .. implement Oracle database technology This book is for those who want advice from a real-world DBA on how Oracle database technology is effectively implemented and maintained Book Structure The book is divided into several sections, with each covering a logical group of database administration topics as follows: Chapters 1, 2, and 3 concentrate on creating a working environment This includes installing the Oracle. .. such as telephone banking voice-processing applications Bernard was coauthor of the Linux Recipes for Oracle DBAs (Apress, 2008) and technical reviewer of two other books, namely, Oracle RMAN Recipes (Apress, 2007) and Pro Oracle SQL (Apress, 2010) He has a bachelor’s degree in computer engineering from the Mapúa Institute of Technology in Manila, Philippines Bernard was born in Iligan, Philippines,... forth DBAs fill the role of the go to person for anything related to Oracle The job of an Oracle database administrator is often complex and challenging This book focuses on practical examples and techniques for ensuring a smoothly operating database environment The content within is drawn from years of experience of working with Oracle technology This book shows you from the ground up how a senior... is to elevate you to a professional level database administrator Being a DBA doesn't have to constantly painful The key is to correctly implement the technology the first time, don't paint yourself into a corner with a badly implemented feature, and proactively manage your surroundings This book doesn't show you the most complex and sophisticated techniques used in the database administration I try to... basketball fanatic xxx Acknowledgments Special thanks go to Jonathan Gennick for providing invaluable input on the content, style, tone, and organization of this book A huge thanks goes to Bernard Lopuz for his numerous suggestions and additions Bernard also authored Chapter 20 on Oracle Secure Backup Thanks also to the project manager Anita Castro and the copy editor Mary Behr and Tiffany Taylor It... techniques used to automate database jobs and how to troubleshoot typical problems that DBAs encounter Conventions Used in This Book The following typographical conventions are used in this book: • • • • • • • $ is used to denote Linux/Unix commands that can be run by the operating system owner of the Oracle binaries (usually named oracle) # is used to denote Linux/Unix commands that should be run as the... Restore and Recovery 509 Determining Media Recovery Required 510 Determining What to Restore 511 xxiii ■ CONTENTS How the Process Works 511 Using Data Recovery Advisor 512 Using RMAN to Stop/Start Oracle 515 Shutting Down 515 Starting Up 515 Complete Recovery 516 Testing Restore and Recovery . 229704 55999 Pro Covers 11g Release 2! Pro Oracle Database 11g Administration Pro Oracle Database 11g Administration is a task-oriented guide to managing complex database environments using Oracle. ROADMAP Troubleshooting Oracle Performance Expert Oracle Practices Pro Oracle Database 11g Administration RMAN Recipes for Oracle Database 11g Beginning Oracle Database 11g Administration www.apress.com Companion eBook . spine = 1.34375" 720 page count PPI = 534 Kuhn Oracle Database 11g Administration THE EXPERT’S VOICE ® IN ORACLE Pro Oracle Database 11g Administration CYAN MAGENTA YELLOW BLACK

Ngày đăng: 27/10/2014, 01:00

TỪ KHÓA LIÊN QUAN