Team-Fly Oracle Internals: Tips, Tricks, and Techniques for DBAs by Donald K ISBN:084931139X Burleson (ed) Auerbach Publications © 2002 (878 pages) Provides a valuable compilation of articles,pointers and practices from the Oracle Internal newsletter Table of Contents Oracle Internals—Tips, Tricks, and Techniques for DBAs Introduction Part I - Oracle Applications Development Techniques Chapter 1 - A Practical Example of Data Conversion Chapter 2 - Using Wizards in an Oracle Developer 6i Form Using Oracle’s Developer 6i to Create a Record Chapter 3 Directory Using Hierarchical Tree Items in Oracle’s Chapter 4 Developer 6i Populating Oracle Form Hierarchies Chapter 5 Incrementally at Runtime Oracle Designer 2.1.2.API: Enforcing Column Chapter 6 - Naming Standards Part II - Oracle Web Development Chapter 7 - Building a com from the Ground Up Chapter 8 - Rapid Web Deploymentwith WebDB Chapter 9 - Introduction to iAS for the OAS Administrator Chapter 10 - Viewing Performance Data with OAS Chapter 11 - Top DBA Scripts for Web Developers Chapter 12 - Web-Based Testing and Capacity Planning Chapter 13 - HTTP Listeners Chapter 14 - Introduction to UTL_HTTP Portal 3.0: Moving Folders Across Content Chapter 15 Areas with Its API Chapter 16 - Not WebDB 3.0, Not iPortal, But Oracle Portal Part III - Java and Oracle Chapter 17 - The Fast Track to Java with Oracle Chapter 18 - Building a Java Appletfor Monitoring Oracle Part IV - Oracle and UNIX Chapter 19 - UNIX Scripts for Oracle Administration Chapter 20 - UNIX Tips and Tricks for the Oracle DBA File Exchange Solutions: SQL*Loader, PL/SQL, Chapter 21 and Pro*C Gauging How Linux May Change the DBMS Chapter 22 Market Part V - Oracle Backup and Recovery Strategies for an Archives Management Program Chapter 24 - Scripting Oracle Backups with RMAN and EBU Chapter 25 - Alert Mechanismsfor RMAN Backups Chapter 26 - Tips and Scripts for Implementing RMAN Chapter 23 - Chapter 27 - Paging People with Oracle8i Out of the Box Part VI - Oracle SQL Tuning Chapter 28 - Cost-Based Optimization: Whys and Hows Chapter 29 - Analytic Functions Piranhas in the Pool: Investigations into Literal Chapter 30 SQL and Oracle Shared Pool Performance Chapter 31 - Managing Database Objects in Sets Chapter 32 - Oracle’s Joins Chapter 33 - To_Format Part VII - Oracle Disk Management Exploring Disk Size and Oracle Disk I/O Performance Adaptive Strategies for Disk Performance in Chapter 35 Oracle Chapter 36 - RAID and Oracle Chapter 37 - Visualizing the I/O Signature Chapter 34 - Part VIII - Distributed Oracle Systems Automating Distribution of Oracle Client Software Chapter 39 - SQL*Net Diagnostics and Performance Tuning Chapter 38 - Part IX - Oracle Buffer and SGA Management Chapter 40 - Pinning Packages in the SGA Investigating the Multiple Buffer Pool Feature of Chapter 41 Oracle8 Chapter 42 - Diving into the Shared Pool Chapter 43 - Managing Multiple Buffer Pools in Oracle8 Chapter 44 - Oracle8i Buffer Cache: New Features Part X - Oracle Table Management Chapter 45 - How I Reorganized a Large Database Chapter 46 - Partition and Conquer Chapter 47 - Eliminating Space Reorganizations in Oracle8i Determining the Table Rebuild Ratio for Oracle Chapter 48 Tables Chapter 49 - Oracle Parallel Query Chapter 50 - Managing Oracle Table Freelists Part XI - Oracle Security Chapter 51 - Using Roles in Oracle Security Chapter 52 - Managing Row-Level Security in Oracle8i Chapter 53 - Auditing Oracle Part XII - Oracle Data Warehousing Chapter 54 - What’s Wrong with My Data? Chapter 55 - Oracle Express Development in the Enterprise An Approach to Load Analysis and Stress Chapter 56 Testing Chapter 57 - Undocumented Express Enterprise Transformation and Data Chapter 58 Management Part XIII - Oracle Database Internals Management Chapter 59 - Getting a Quick Start with Oracle8i Chapter 60 - Oracle Sessions Monitoring Chapter 61 - The Object/Relational Features of Oracle8 Chapter 62 - Hardware Considerations Chapter 63 - Oracle Extras Chapter 64 - Oracle’s Triggers Chapter 65 - Concurrency Chapter 66 - The Supporting GROUPS Chapter 67 - Registering a Metadata Schema Chapter 68 - ORADEBUG: A Useful (Undocumented?) Utility Index Chapter 69 - Using the DBMS_LOCK Built-In Package List of Appendices List of Exhibits Team-Fly Team-Fly Back Cover If you are a typical Oracle professional, you don't have the luxury of time to keep up with new technology and read all the new manuals to understand each new feature of each release of Oracle You need a comprehensive source of information and techniques for using the new technology You need Oracle Internals: Tips, Tricks, and Techniques for DBAs This book is a compendium of the best and most useful articles from Oracle Internals, Auerbach Publications' newsletter for Oracle database administrators and other Oracle professionals Edited by Oracle guru Donald K Burleson, it provides in-depth, highly technical information not found in any other books, information only available from peers and consultants The chapters focus on the truly tough stuff proven techniques learned in the trenches You could get this information from other sources, but you'd have to hunt and peck for it Oracle Interals: Tips, Tricks, and Techniques for DBAs gives you all the advice you need in one easy-to-use resource FEATURES Highlights the suite of Oracle Web development tools and gives you an in-depth understanding of the internal communications between HTTP and XML Demonstrates how Java can be used to create portable and robust Oracle applications Contains invlauable tips and tricks regarding how to use the different dialects of UNIX to communicate with the database Provides information from Oracle tuning experts on maximizing the performance of SQL statements within Oracle's library cache and ensuring that your Oracle database runs at optimal levels Explains the internal architecture of disk I/O subsystems and how to ensure that they make proper use of Oracle's RAM buffers in order to minimize disk I/O Explores issues surrounding distributed Oracle systems, specfically techniques for automating the distribution of Oracle client software and tools for Net8 and SQL *Net performance tuning Covers the technical nuances of the EBU and RMAN products Team-Fly Team-Fly Oracle Internals-Tips, Tricks, and Techniques for DBAs Donald K Burleson, Editor Chapter 44, 'Oracle 8i Buffer Cache: New Features,' copyright ©2000 by John Beresniewicz andSavant Corporation Printed with permission Chapter 47, 'Eliminating Space Reorganizations in Oracle 8i,' copyright ©2000, Robin Schumacher.Printed with permission Library of Congress Cataloging-in-Publication Data Oracle internals: tips, tricks, and techniques for DBAs/ edited by Donald K Burleson p cm Includes bibliographical references and index ISBN 0-8493-1139-X Oracle (Computer file) 2 Relational databases I Burleson, Donald K QA76.9.D3 07292001 005.756dc21 2001032077 This book contains information obtained from authentic and highly regarded sources Reprinted material is quoted with permission, and sources are indicated A wide variety of references are listed Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher All rights reserved Authorization to photocopy items for internal or personal use, or the personal or internal use of specific clients, may be granted by CRC Press LLC, provided that $1.50 per page photocopied is paid directly to Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923 USA The fee code for users of the Transactional Reporting Service is ISBN 0-8493-1139-X/02/$0.00+$1.50 The fee is subject to change without notice For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works, or for resale Specific permission must be obtained in writing from CRC Press LLC for such copying Direct all inquiries to CRC Press LLC, 2000 N.W Corporate Blvd., Boca Raton, Florida 33431 Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe Visit the Auerbach Publications Web site at www.auerbach-publications.com © 2002 by CRC Press LLC Auerbach is an imprint of CRC Press LLC No claim to original U.S Government works International Standard Book Number 0-8493-1139-X Library of Congress Card Number 2001032077 Printed in the United States of America 1 2 3 4 5 6 7 8 9 0 Contributors Michael R Ault Consultant, DMR Consulting Group, Alpharetta, Georgia Chapter 49: Oracle Parallel Query Exhibit 49.1: Parallel Create Table as Select Exhibit 49.2: A Sample Parallel Sort Chapter 50: Managing Oracle Table Freelists Exhibit 50.1: A Segment Block Header Exhibit 50.2: Basic Linkages of a Segment Freelist Exhibit 50.3: Adjusting Freelist Pointers for a New Free Block Exhibit 50.4: A Freelist Pointer after an Unlink Exhibit 50.5: Simultaneous Inserts from Multiple Instances Exhibit 50.6: Deleting Rows from Only One Instance Exhibit 50.7: A Table with Unbalanced Freelists Extending Exhibit 50.8: Searching for a Free Block Exhibit 50.9: Block Layout for 4000-Byte Blocks with 1700-Byte Rows Chapter 51: Using Roles in Oracle Security Exhibit 51.1: The Security Matrix (Object Privileges) Exhibit 51.2: The Security Matrix (System Privileges) Chapter 52: Managing Row-Level Security in Oracle8i Exhibit 52.1: Steps to Implement a Security Policy Exhibit 52.2: Example of Context Setting Procedure Exhibit 52.3: Example Database Login Trigger Exhibit 52.4: Sample Context Package Exhibit 52.5: Procedure in DBMS_RLS Package Chapter 53: Auditing Oracle Exhibit 53.1: A Typical Table Format Exhibit 53.2: Results of the Report Exhibit 53.3: All Grantable Object Privileges Chapter 54: What’s Wrong with My Data? Exhibit 54.1: Example of Missing Data Exhibit 54.2: Example of Redundant Data Exhibit 54.3: Example of Different Logic Exhibit 54.4: Example of Primary Key Problems Exhibit 54.5: Example of Nonstandardized and Multi-element Fields Exhibit 54.6: Example of Invalid Values Exhibit 54.7: Example of Incorrect Values Exhibit 54.8: Example of Referential Integrity Problems Chapter 56: An Approach to Load Analysis and Stress Testing Exhibit 56.1: Process Flow in Stress Testing Methodology Exhibit 56.2: Intensity of Physical Reads in the Oracle Database Across Weekdays/Hours Exhibit 56.3: Intensity of Sorts (Rows) in the Oracle Database Across Weekdays/Hours Exhibit 56.4: Critical Oracle Statistics Exhibit 56.5: Multi-stage, Multi-variate Regressions Exhibit 56.6: Individual Characterized Loads Pool Together to Simulate a Desired Load Dimension Exhibit 56.7: Dataserver Yield Restrictions Flattening the Curve at Threshold Load Levels; Response Times to User/Batch Operations Rise Accordingly Chapter 59: Getting a Quick Start with Oracle8i Exhibit 59.1: Data Distribution with Portable Tablespaces Exhibit 59.2: Oracle Transparently Rewrites SQL Statements to Utilize Materialized Views Exhibit 59.3: Fine-Grained Application Security — Steps Chapter 61: The Object/Relational Features of Oracle8 Exhibit 61.1: Objects Made Up of Atomic Relational Entities Exhibit 61.2: Pointers to VARRAYs of Row Pointers Chapter 62: Hardware Considerations Exhibit 62.1: Processor Logical Performance Increase Exhibit 62.2: Processor Trace Size Exhibit 62.3: Response Time versus Cache Hit Ratio Exhibit 62.4: DRAM Technology Advances as a Function of Time Exhibit 62.5: Result Summary Chapter 63: Oracle Extras Exhibit 63.1: Initial Web Publishing Assistant Page Exhibit 63.2: Date and Time Format Codes Chapter 64: Oracle’s Triggers Exhibit 64.1: Student Table Chapter 65: Concurrency Exhibit 65.1: Data Retrieval for Query with System Change Number (SCN) of n Chapter 66: The Supporting GROUPS Exhibit 66.1: Summing the Invoice Amount for Invoice Numbers Exhibit 66.2: Concatenating the Invoice Description for Invoice Numbers Chapter 69: Using the DBMS_LOCK Built-In Package Exhibit 69.1: The DBMS_LOCK Programs Exhibit 69.2: Calling Signatures of DBMS_LOCK Programs Exhibit 69.3: Minimizing Calls to ALLOCATE_UNIQUE Using a Persistent Package Variable Exhibit 69.4: Encapsulating REQUEST in a Function Returning a Boolean Exhibit 69.5: Compatibility of Null, Share, and Exclusive Locking Modes Team-Fly ... comprehensive source of information and techniques for using the new technology You need Oracle Internals: Tips, Tricks, and Techniques for DBAs This book is a compendium of the best and most useful articles from Oracle Internals, Auerbach Publications'... techniques learned in the trenches You could get this information from other sources, but you'd have to hunt and peck for it Oracle Interals: Tips, Tricks, and Techniques for DBAs gives you all the advice you need... Team-Fly Oracle Internals- Tips, Tricks, and Techniques for DBAs Donald K Burleson, Editor Chapter 44, 'Oracle 8i Buffer Cache: New Features,' copyright ©2000 by John Beresniewicz andSavant Corporation