You are on page 1of 8

Oracle Database 10g: Managing Oracle on Linux for DBAs

Student Guide

D46590GC11 Edition 1.1 April 2007 D49900

Authors
Tom Best S. Matt Taylor Jr.

Copyright 2007, Oracle. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Technical Contributors and Reviewers


Maria Billings MJ Bryksa Al Flournoy Mark Fuller Sush Jagannath Donna Keesling Sergio Leunissen Greg Marsden Prasanth Narayanan Abhishek Singh James Spiller Herbert van den Bergh Harald van Breederode James Womack

Editor
Amitha Narayan

Graphic Designers
Satish Bettegowda Samir Mozumdar

Publishers
Sujatha Nagendra Nita Brozowski

Contents

Preface 1 Introduction Objectives 1-2 Suggested Course Schedule 1-3 Supported Linux Distributions 1-4 Linux Distribution: Overview 1-5 Linux Packages 1-6 Linux Kernel 1-7 Verifying the Kernel 1-8 Interpreting the Linux Kernel Version Number 1-9 A Tainted Linux Kernel 1-10 Checking for a Tainted Kernel 1-11 Supported Hardware 1-12 Common Linux Commands and Programs 1-13 Navigating the File System 1-15 The Virtual File System 1-16 Using the Virtual File System 1-17 Bash Shell Scripting 1-18 Bash Shell Scripting: Environment Variables 1-19 Redirecting Input and Output 1-21 Bash Shell Scripting: Conditions 1-23 Bash Shell Scripting: case 1-24 Bash Shell Scripting: while 1-25 Bash Shell Scripting: In-List Syntax of for 1-26 Bash Shell Scripting: Controlled Loop Syntax of for 1-27 Summary 1-28 Practice 1 Overview: Working with Linux 1-29 2 Preparing Linux for Oracle Objectives 2-2 Setting Kernel Parameters 2-3 Linux Shared Memory: Overview 2-6 Shared Memory Parameters for 32-Bit Linux 2-7 Semaphores 2-9

iii

Setting Semaphore Parameters 2-10 Setting the File Handles Parameter 2-11 Setting Other Parameters 2-12 Shell Limits 2-13 Setting Shell Limits 2-15 Managing Packages 2-17 Required Software 2-19 Linux Patches 2-21 Configuring the X Window System 2-22 Testing the X Window System 2-23 Creating Groups 2-25 Creating and Viewing a Group 2-27 Creating the Oracle Software Owner 2-28 The nobody User 2-30 Summary 2-31 Practice 2 Overview: Preparing Linux for Oracle 2-32 3 Installing Oracle on Linux Objectives 3-2 File System Security 3-3 File Security Attributes 3-4 SETUID and SETGID Bits 3-5 Choosing a Shell 3-6 Setting Environment Variables 3-7 User File Creation Mask 3-8 Setting Oracle Environment Variables 3-9 Optimal Flexible Architecture 3-10 OFA Characteristics 3-11 Mount Points 3-13 ORACLE_HOME and ORACLE_BASE 3-14 Creating the Oracle Directories 3-15 Installing New Releases 3-16 Managing Multiple Versions 3-17 Setting Oracle Environment Variables 3-19 Mounting the CD-ROM 3-21 Starting the Installer 3-22 Oracle Universal Installer 3-23 Installation Log Files 3-24 Prerequisite Check Results 3-25 Oracle Patch Utility 3-26

iv

Oracle Relink Utility 3-28 Troubleshooting 3-30 Summary 3-31 Practice 3 Overview: Installing Oracle on Linux 3-32 4 Managing Storage Objectives 4-2 Certified and Supported File Systems 4-3 Disk Partitioning 4-4 Comparing File Systems 4-6 File System Characteristics 4-7 Automatic Storage Management 4-9 ext2 and ext3 4-10 Oracle Clustered File System 2 4-11 Network File System 4-12 Summary 4-13 Automatic Storage Management and Automatic Storage Management Library Driver Objectives 5-2 Automatic Storage Management 5-3 Automatic Storage Management Library Driver (ASMLib) 5-4 Installing and Initializing ASMLib 5-5 Configuring Disks 5-6 Marking Disks As Automatic Storage Management Disks 5-7 Creating an ASM Instance 5-8 ASM and ASMLib Installation and Configuration Summary 5-9 ASM Installation: Best Practices 5-10 Disk Group: Best Practices 5-11 Summary 5-12 Practice 5 Overview: Installing and Configuring ASMLib and ASM 5-13 Creating the Database Objectives 6-2 Creating a Database 6-3 Choosing the Storage Mechanism 6-4 Specifying the ASM Disk Groups 6-5 Assigning ASM Disk Groups 6-6 dbca Log Files 6-7 The Instance admin Directory 6-8

Parameter and Dump Files 6-9 The portlist.ini File 6-10 URL Deployment Information 6-11 Miscellaneous Files 6-12 Background Processes 6-13 Server Processes 6-15 Process Hierarchy 6-16 Implementing OS Authentication for DBAs 6-17 Summary 6-18 Practice 6 Overview: Creating a Database 6-19 7 Customizing Oracle on Linux Objectives 7-2 Controlling Oracle Database 7-3 Linux Startup Sequence 7-4 Linux Runlevels 7-7 Database Startup and Shutdown 7-8 Administrative Scripts 7-10 Managing Services with chkconfig 7-12 Automating Jobs 7-13 OS Scheduling Tools 7-14 Job Capabilities of DB Console 7-16 Database Backups 7-17 Backing Up with RMAN 7-18 Server Parameter File 7-19 Summary 7-20 Practice 7 Overview: Automating Tasks 7-21 Managing Memory Objectives 8-2 Swap Space 8-3 Swap Cache 8-4 Sizing Swap Space 8-6 /proc/meminfo 8-7 Evaluating Free Memory 8-8 Memory Terminology 8-9 Page Address Extensions (PAE) 8-10 Hugepages 8-11 Implementing Hugepages on 32-Bit Linux 8-12 Implementing a Large SGA 8-14

vi

Standard Linux Memory Map 8-15 Modified Linux Memory Map 8-16 Altering the Linux Memory Map 8-17 Relocating the SGA 8-19 Relocating the Database Buffer Cache 8-20 hugemem Kernel 8-22 Summary 8-23 Practice 8 Overview: Managing Memory 8-24 9 Using Linux Measurement Tools Objectives 9-2 Basic Tuning Methodology 9-3 Standard Measurement Tools 9-4 Linux Tools 9-6 Common Areas to Tune 9-8 Monitoring and Tuning CPU 9-9 Is the CPU a Bottleneck? 9-10 CPU Measurements 9-12 Measuring CPU Activity with vmstat 9-14 Interpreting CPU Measurements 9-17 Reducing CPU Bottlenecks 9-19 Monitoring and Tuning Memory 9-20 Measuring Memory Usage 9-21 Measuring Total Memory 9-23 Measuring Memory with sar 9-25 Interpreting Memory Measurements 9-27 Reducing Memory Bottlenecks 9-29 Monitoring and Tuning I/O 9-30 Is I/O a Bottleneck? 9-31 I/O Measurements 9-32 Measuring I/O with iostat 9-33 Interpreting I/O Measurements 9-36 Reducing I/O Bottlenecks 9-37 Summary 9-38 Practice 9 Overview: Using Linux Measurement Tools 9-39

10 Tuning Oracle on Linux Objectives 10-2 Basic Oracle Database Optimizations 10-3 Sizing Database Blocks 10-4

vii

LOG_BUFFER and Redo Log File 10-6 Advanced Features of Oracle Server 10-8 Multiple DBWR Processes 10-9 DB Writer Slaves 10-10 Changing SGA Behavior 10-11 Automatic Shared Memory Management 10-12 Basic Linux Optimizations 10-13 Choosing a Kernel 10-14 Summary 10-15 Practice 10 Overview: Tuning Performance 10-16 11 Dedugging Oracle on Linux Objectives 11-2 OS Watcher 11-3 Installing OSW 11-4 Configuring OSW 11-5 Running OSW 11-6 Viewing OSW Output 11-7 Remote Diagnostics Agent 11-8 Installing the RDA 11-9 Running the RDA 11-10 Viewing the RDA Output 11-11 Navigating the RDA Output 11-12 strace 11-13 ORA-600 Errors 11-15 ORA-7445 Errors 11-16 Resolving ORA-600/ORA-7445 Errors 11-17 Summary 11-19 Practice 11 Overview: Debugging Oracle on Linux 11-20 Appendix A: Practices Appendix B: Practice Solutions Appendix C: Basic Linux and vi Commands Index

viii

You might also like