0%

Book Description

Linux and Solaris Recipes for Oracle DBAs, 2nd Edition is an example–based book on managing Oracle Database under Linux and Solaris. The book is written for database administrators who need to get work done and lack the luxury of curling up fireside with a stack of operating-system documentation. What this book provides instead is task-oriented coverage designed around the needs of the Oracle Database Administrator. Find the right chapter. Look up the task to perform. See the solution. Implement the solution straight away in your own environment. Get the job done.

New in this edition is coverage of Oracle's own Solaris operating system. Oracle Corporation has been working diligently to bring commonality between Solaris and Linux, and this book takes advantage of those efforts to provide task-oriented solutions that work on common distributions of Linux such as Red Hat Enterprise Linux and Oracle Enterprise Linux while also accommodating the growing number of Oracle Solaris customers. Examples in the book match the tasks DBAs perform daily, even hourly. Solutions come first in the book, but always are followed by close explanations of the details.

Database administrators won't go wrong with Linux and Solaris Recipes for Oracle DBAs. It's the book to buy if you're after clear and reliable examples to help in getting the job done, and getting home to your family.

  • • Takes you directly from problem to solution
  • • Covers the "right" mix of operating-system tasks for database administrators
  • Respects your time by being succinct and to–the–point
  • • Includes coverage of Solaris in addition to common Linux distributions
  • Table of Contents

    1. Cover
    2. Title
    3. Copyright
    4. Dedication
    5. Contents at a Glance
    6. Contents
    7. About the Authors
    8. About the Technical Reviewer
    9. Acknowledgments
    10. Introduction
    11. Chapter 1: Getting Started
      1. 1-1. Connecting Securely to a Remote Server
        1. Problem
        2. Solution
        3. How It Works
      2. 1-2. Logging on Remotely via the Command Line
        1. Problem
        2. Solution
        3. How It Works
      3. 1-3. Logging off the Server
        1. Problem
        2. Solution
        3. How It Works
      4. 1-4. Running a Command
        1. Problem
        2. Solution
        3. How It Works
      5. 1-5. Getting Help
        1. Problem
        2. Solution
        3. How It Works
      6. 1-6. Correcting Command-Line Mistakes
        1. Problem
        2. Solution
        3. How It Works
      7. 1-7. Clearing the Screen
        1. Problem
        2. Solution
        3. How It Works
      8. 1-8. Resetting the Screen
        1. Problem
        2. Solution
        3. How It Works
    12. Chapter 2: Working in the Shell
      1. 2-1. Displaying the Current Shell
        1. Problem
        2. Solution
        3. How It Works
      2. 2-2. Running Previously Entered Commands
        1. Problem
        2. Solution
        3. How It Works
      3. 2-3. Automatically Completing Long Commands
        1. Problem
        2. Solution
        3. How It Works
      4. 2-4. Viewing Environment Variables
        1. Problem
        2. Solution
        3. How It Works
      5. 2-5. Automatically Setting Shell Variables
        1. Problem
        2. Solution
        3. How It Works
      6. 2-6. Customizing the Command Prompt
        1. Problem
        2. Solution
        3. How It Works
      7. 2-7. Creating a Command Shortcut
        1. Problem
        2. Solution
        3. How It Works
      8. 2-8. Providing Input to Commands
        1. Problem
        2. Solution
        3. How It Works
      9. 2-9. Redirecting Command Output
        1. Problem
        2. Solution
        3. How It Works
      10. 2-10. Sending Output to Nowhere
        1. Problem
        2. Solution
        3. How It Works
      11. 2-11. Displaying and Capturing Command Output
        1. Problem
        2. Solution
        3. How It Works
      12. 2-12. Recording All Shell Command Output
        1. Problem
        2. Solution
        3. How It Works
      13. 2-13. Changing the Login Shell
        1. Problem
        2. Solution
        3. How It Works
      14. 2-14. Modifying Command Path Search
        1. Problem
        2. Solution
        3. How It Works
      15. 2-15. Viewing Built-in Commands
        1. Problem
        2. Solution
        3. How It Works
      16. 2-16. Setting the Backspace Key
        1. Problem
        2. Solution
        3. How It Works
      17. 2-17. Typing a Long Command in Multiple Lines
        1. Problem
        2. Solution
        3. How It Works
    13. Chapter 3: Managing Processes and Users
      1. 3-1. Listing Processes
        1. Problem
        2. Solution
        3. How It Works
      2. 3-2. Terminating Processes
        1. Problem
        2. Solution
        3. How It Works
      3. 3-3. Listing the Users Logged On
        1. Problem
        2. Solution
        3. How It Works
      4. 3-4. Listing the Last Logon Time of a User
        1. Problem
        2. Solution
        3. How It Works
      5. 3-5. Limiting the Number of User Processes
        1. Problem
        2. Solution
        3. How It Works
      6. 3-6. Viewing How Long the Server Has Been Running
        1. Problem
        2. Solution
        3. How It Works
      7. 3-7. Viewing How Long a Process Has Been Running
        1. Problem
        2. Solution
        3. How It Works
      8. 3-8. Displaying Your Username
        1. Problem
        2. Solution
        3. How It Works
      9. 3-9. Changing Your Password
        1. Problem
        2. Solution
        3. How It Works
      10. 3-10. Becoming the System Privileged (root) User
        1. Problem
        2. Solution
        3. How It Works
      11. 3-11. Running Commands as the root User
        1. Problem
        2. Solution
        3. How It Works
      12. 3-12. Adding a Group
        1. Problem
        2. Solution
        3. How It Works
      13. 3-13. Removing a Group
        1. Problem
        2. Solution
        3. How It Works
      14. 3-14. Adding a User
        1. Problem
        2. Solution
        3. How It Works
      15. 3-15. Removing a User
        1. Problem
        2. Solution
        3. How It Works
    14. Chapter 4: Creating and Editing Files
      1. 4-1. Creating a File
        1. Problem
        2. Solution
        3. How It Works
      2. 4-2. Maneuvering Within a File
        1. Problem
        2. Solution
        3. How It Works
      3. 4-3. Copying and Pasting
        1. Problem
        2. Solution
        3. How It Works
      4. 4-4. Manipulating Text
        1. Problem
        2. Solution
        3. How It Works
      5. 4-5. Searching for and Replacing Text
        1. Problem
        2. Solution
        3. How It Works
      6. 4-6. Inserting One File into Another
        1. Problem
        2. Solution
        3. How It Works
      7. 4-7. Joining Lines
        1. Problem
        2. Solution
        3. How It Works
      8. 4-8. Running Operating System Commands
        1. Problem
        2. Solution
        3. How It Works
      9. 4-9. Repeating a Command
        1. Problem
        2. Solution
        3. How It Works
      10. 4-10. Undoing a Command
        1. Problem
        2. Solution
        3. How It Works
      11. 4-11. Displaying Line Numbers
        1. Problem
        2. Solution
        3. How It Works
      12. 4-12. Automatically Configuring Settings
        1. Problem
        2. Solution
        3. How It Works
      13. 4-13. Creating Shortcuts for Commands
        1. Problem
        2. Solution
        3. How It Works
      14. 4-14. Setting the Shell Default Text Editor
        1. Problem
        2. Solution
        3. How It Works
      15. 4-15. Setting the SQL*Plus Text Editor
        1. Problem
        2. Solution
        3. How It Works
      16. 4-16. Toggling Syntax Text Color
        1. Problem
        2. Solution
        3. How It Works
    15. Chapter 5: Managing Files and Directories
      1. 5-1. Showing the Current Working Directory
        1. Problem
        2. Solution
        3. How It Works
      2. 5-2. Changing Directories
        1. Problem
        2. Solution
        3. How It Works
      3. 5-3. Creating a Directory
        1. Problem
        2. Solution
        3. How It Works
      4. 5-4. Viewing a List of Directories
        1. Problem
        2. Solution
        3. How It Works
      5. 5-5. Removing a Directory
        1. Problem
        2. Solution
        3. How It Works
      6. 5-6. Listing Files
        1. Problem
        2. Solution
        3. How It Works
      7. 5-7. Creating a File Quickly
        1. Problem
        2. Solution
        3. How It Works
      8. 5-8. Changing File Permissions
        1. Problem
        2. Solution
        3. How It Works
      9. 5-9. Changing File Ownership and Group Membership
        1. Problem
        2. Solution
        3. How It Works
      10. 5-10. Viewing the Contents of a Text File
        1. Problem
        2. Solution
        3. How It Works
      11. 5-11. Viewing Nonprinting Characters in a File
        1. Problem
        2. Solution
        3. How It Works
      12. 5-12. Viewing Hidden Files
        1. Problem
        2. Solution
        3. How It Works
      13. 5-13. Determining File Type
        1. Problem
        2. Solution
        3. How It Works
      14. 5-14. Finding Differences Between Files
        1. Problem
        2. Solution
        3. How It Works
      15. 5-15. Comparing Contents of Directories
        1. Problem
        2. Solution
        3. How It Works
      16. 5-16. Copying Files
        1. Problem
        2. Solution
        3. How It Works
      17. 5-17. Copying Directories
        1. Problem
        2. Solution
        3. How It Works
      18. 5-18. Moving Files and Directories
        1. Problem
        2. Solution
        3. How It Works
      19. 5-19. Renaming a File or Directory
        1. Problem
        2. Solution
        3. How It Works
      20. 5-20. Removing a File
        1. Problem
        2. Solution
        3. How It Works
      21. 5-21. Removing Protected Files Without Being Prompted
        1. Problem
        2. Solution
        3. How It Works
      22. 5-22. Removing Oddly Named Files
        1. Problem
        2. Solution
        3. How It Works
      23. 5-23. Finding Files
        1. Problem
        2. Solution
        3. How It Works
      24. 5-24. Finding Strings in Files
        1. Problem
        2. Solution
        3. How It Works
      25. 5-25. Finding a Recently Modified File
        1. Problem
        2. Solution
        3. How It Works
      26. 5-26. Finding and Removing Old Files
        1. Problem
        2. Solution
        3. How It Works
      27. 5-27. Finding the Largest Files
        1. Problem
        2. Solution
        3. How It Works
      28. 5-28. Finding a File of a Certain Size
        1. Problem
        2. Solution
        3. How It Works
      29. 5-29. Sorting Files by Size
        1. Problem
        2. Solution
        3. How It Works
      30. 5-30. Finding the Largest Space-Consuming Directories
        1. Problem
        2. Solution
        3. How It Works
      31. 5-31. Truncating an Operating System File
        1. Problem
        2. Solution
        3. How It Works
      32. 5-32. Counting Lines and Words in a File
        1. Problem
        2. Solution
        3. How It Works
      33. 5-33. Creating a Second Name for a File
        1. Problem
        2. Solution
        3. How It Works
      34. 5-34. Creating a Second Name for a Directory
        1. Problem
        2. Solution
        3. How It Works
      35. 5-35. Viewing a Large File
        1. Problem
        2. Solution
        3. How It Works
      36. 5-36. Downloading Files
        1. Problem
        2. Solution
        3. How It Works
    16. Chapter 6: Archiving and Compressing Files
      1. 6-1. Bundling Files Using tar
        1. Problem
        2. Solution
        3. How It Works
      2. 6-2. Unbundling Files Using tar
        1. Problem
        2. Solution
        3. How It Works
      3. 6-3. Finding Differences in Bundled Files Using tar
        1. Problem
        2. Solution
        3. How It Works
      4. 6-4. Bundling Files Using cpio
        1. Problem
        2. Solution
        3. How It Works
      5. 6-5. Unbundling Files Using cpio
        1. Problem
        2. Solution
        3. How It Works
      6. 6-6. Bundling Files Using zip
        1. Problem
        2. Solution
        3. How It Works
      7. 6-7. Unbundling Files Using zip
        1. Problem
        2. Solution
        3. How It Works
      8. 6-8. Bundling Files Using find
        1. Problem
        2. Solution
        3. How It Works
      9. 6-9. Compressing and Uncompressing Files
        1. Problem
        2. Solution
        3. How It Works
      10. 6-10. Validating File Contents
        1. Problem
        2. Solution
        3. How It Works
    17. Chapter 7: Shell Scripting
      1. 7-1. Writing a Simple Shell Script
        1. Problem
        2. Solution
        3. How It Works
      2. 7-2. Checking Simple Conditions
        1. Problem
        2. Solution
        3. How It Works
      3. 7-3. Testing a Condition
        1. Problem
        2. Solution
        3. How It Works
      4. 7-4. Checking Complex Conditions
        1. Problem
        2. Solution
        3. How It Works
      5. 7-5. Repeating a Task
        1. Problem
        2. Solution
        3. How It Works
      6. 7-6. Iterating Until a Condition Is Met
        1. Problem
        2. Solution
        3. How It Works
      7. 7-7. Displaying a Menu of Choices
        1. Problem
        2. Solution
        3. How It Works
      8. 7-8. Running Commands Based on Success/Failure of the Previous Command
        1. Problem
        2. Solution
        3. How It Works
      9. 7-9. Modularizing Scripts
        1. Problem
        2. Solution
        3. How It Works
      10. 7-10. Passing Parameters to Scripts
        1. Problem
        2. Solution
        3. How It Works
      11. 7-11. Processing Parameters
        1. Problem
        2. Solution
        3. How It Works
      12. 7-12. Running Database Commands in Scripts
        1. Problem
        2. Solution
        3. How It Works
      13. 7-13. Crafting a Robust DBA Shell Script
        1. Problem
        2. Solution
        3. How It Works
      14. 7-14. Running Scripts in the Background
        1. Problem
        2. Solution
        3. How It Works
      15. 7-15. Monitoring the Progress of a Script
        1. Problem
        2. Solution
        3. How It Works
      16. 7-16. Debugging a Script
        1. Problem
        2. Solution
        3. How It Works
    18. Chapter 8: Analyzing Server Performance
      1. 8-1. Identifying System Bottlenecks
        1. Problem
        2. Solution
        3. How It Works
      2. 8-2. Analyzing Current and Past System Performance
        1. Problem
        2. Solution
        3. How It Works
      3. 8-3. Identifying CPU-Intensive Processes
        1. Problem
        2. Solution
        3. How It Works
      4. 8-4. Identifying CPU Bottlenecks
        1. Problem
        2. Solution
        3. How It Works
      5. 8-5. Identifying Memory-Intensive Processes
        1. Problem
        2. Solution
        3. How It Works
      6. 8-6. Identifying Memory Bottlenecks
        1. Problem
        2. Solution
        3. How It Works
      7. 8-7. Identifying I/O-Intensive Processes
        1. Problem
        2. Solution
        3. How It Works
      8. 8-8. Identifying I/O Bottlenecks
        1. Problem
        2. Solution
        3. How It Works
      9. 8-9. Monitoring Network Traffic
        1. Problem
        2. Solution
        3. How It Works
      10. 8-10. Troubleshooting Database Connectivity
        1. Problem
        2. Solution
        3. How It Works
      11. 8-11. Tracing a Process
        1. Problem
        2. Solution
        3. How It Works
      12. 8-12. Listing Files Opened by Processes
        1. Problem
        2. Solution
        3. How It Works
    19. Chapter 9: Viewing and Configuring System Resources
      1. 9-1. Displaying Server Hardware and the Operating System
        1. Problem
        2. Solution
        3. How It Works
      2. 9-2. Listing CPUs
        1. Problem
        2. Solution
        3. How It Works
      3. 9-3. Displaying Physical Memory
        1. Problem
        2. Solution
        3. How It Works
      4. 9-4. Viewing Kernel Parameters
        1. Problem
        2. Solution
        3. How It Works
      5. 9-5. Modifying Kernel Parameters
        1. Problem
        2. Solution
        3. How It Works
      6. 9-6. Displaying Semaphores
        1. Problem
        2. Solution
        3. How It Works
      7. 9-7. Configuring Semaphores
        1. Problem
        2. Solution
        3. How It Works
      8. 9-8. Viewing Memory Structures
        1. Problem
        2. Solution
        3. How It Works
      9. 9-9. Removing In-Memory Structures
        1. Problem
        2. Solution
        3. How It Works
      10. 9-10. Viewing Network Configuration Settings
        1. Problem
        2. Solution
        3. How It Works
      11. 9-11. Configuring Network Settings
        1. Problem
        2. Solution
        3. How It Works
      12. 9-12. Modifying System Open File Limits
        1. Problem
        2. Solution
        3. How It Works
      13. 9-13. Showing Shell Limits
        1. Problem
        2. Solution
        3. How It Works
      14. 9-14. Changing Shell Limits
        1. Problem
        2. Solution
        3. How It Works
    20. Chapter 10: Automating Jobs with cron
      1. 10-1. Enabling Access to Schedule Jobs
        1. Problem
        2. Solution
        3. How It Works
      2. 10-2. Editing the cron Table
        1. Problem
        2. Solution
        3. How It Works
      3. 10-3. Understanding cron Table Entries
        1. Problem
        2. Solution
        3. How It Works
      4. 10-4. Setting Operating System Variables
        1. Problem
        2. Solution
        3. How It Works
      5. 10-5. Specifying the Execution Shell
        1. Problem
        2. Solution
        3. How It Works
      6. 10-6. Redirecting cron Output
        1. Problem
        2. Solution
        3. How It Works
      7. 10-7. Embedding Conditional Logic
        1. Problem
        2. Solution
        3. How It Works
      8. 10-8. Troubleshooting cron
        1. Problem
        2. Solution
        3. How It Works
    21. Chapter 11: Managing Server Software
      1. 11-1. Installing Packages
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      2. 11-2. Switching to the Oracle Unbreakable Linux Network
        1. Problem
        2. Solution
        3. How It Works
      3. 11-3. Associating Linux Files with RPM Packages
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      4. 11-4. Listing the Contents of an RPM Package
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      5. 11-5. Downloading Packages
        1. Problem
        2. Solution
        3. How It Works
      6. 11-6. Automating Server Builds with Oracle RDBMS Server PreInstall RPM
        1. Problem
        2. Solution
        3. How It Works
      7. 11-7. Upgrading Packages
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      8. 11-8. Removing Packages
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      9. 11-9. Checking RPM Requirements to Install Oracle Database
        1. Problem
        2. Solution
        3. How It Works
      10. 11-10. Performing Initial Silent Oracle Software Installation with Response Files
        1. Problem
        2. Solution #1
        3. Solution #2
        4. How It Works
      11. 11-11. Creating a Database with a Response File
        1. Problem
        2. Solution
        3. How It Works
      12. 11-12. Creating a Network Configuration with a Response File
        1. Problem
        2. Solution
        3. How It Works
      13. 11-13. Applying Patch Set Updates (PSUs) and Interim Patches
        1. Problem
        2. Solution
        3. How It Works
      14. 11-14. Cloning an Oracle Home
        1. Problem
        2. Solution
        3. How It Works
      15. 11-15. Attaching an Oracle Home
        1. Problem
        2. Solution
        3. How It Works
    22. Chapter 12: VirtualBox for Oracle
      1. 12-1. Installing Oracle VM VirtualBox
        1. Problem
        2. Solution
        3. How It Works
      2. 12-2. Setting Up VirtualBox Virtual Machine (VM)
        1. Problem
        2. Solution
        3. How It Works
      3. 12-3. Starting Up a VM for the First Time
        1. Problem
        2. Solution
        3. How It Works
      4. 12-4. Creating Additional Virtual Disks
        1. Problem
        2. Solution
        3. How It Works
      5. 12-5. Provisioning/Sharing a Disk with Another VM
        1. Problem
        2. Solution
        3. How It Works
      6. 12-6. Configuring the Virtual Network
        1. Problem
        2. Solution
        3. How It Works
      7. 12-7. Leveraging/Creating Oracle VM VirtualBox Prebuilt Templates
        1. Problem
        2. Solution #1: Leveraging Oracle’s Prebuilt Template
        3. Solution #2: Creating Your Own OVA Template
        4. How It Works
      8. 12-8. Cloning a VM
        1. Problem
        2. Solution
        3. How It Works
      9. 12-9. Working with Snapshots
        1. Problem
        2. Solution
        3. How It Works
    23. Chapter 13: Optimizing Linux for Oracle Databases
      1. 13-1. Minimalizing the Linux Environment for Performance and Security
        1. Problem
        2. Solution
        3. How It Works
      2. 13-2. Configuring Hugepages
        1. Problem
        2. Solution
        3. How It Works
        4. Automating Hugepages Server Configuration
        5. Computing the Value of Huge Pages on an Existing Linux Server
        6. Disabling Transparent Huge Pages
      3. 13-3. Enabling Jumbo Frames
        1. Problem
        2. Solution
        3. How It Works
      4. 13-4. Determining and Implementing the Right I/O Scheduler
        1. Problem
        2. Solution
        3. How It Works
      5. 13-5. Setting Pertinent Kernel Parameters for Oracle Databases
        1. Problem
        2. Solution
        3. How It Works
      6. 13-6. Configuring NTP for Oracle
        1. Problem
        2. Solution
        3. How It Works
      7. 13-7. Bonding Network Interfaces
        1. Problem
        2. Solution
        3. How It Works
      8. 13-8. Enabling Network Services Cache Daemon (nscd)
        1. Problem
        2. Solution
        3. How It Works
      9. 13-9. Aligning Disk Partitions Correctly
        1. Problem
        2. Solution
        3. How It Works
    24. Chapter 14: Working Securely Across a Network
      1. 14-1. Setting Up SSH
        1. Problem
        2. Solution
        3. How It Works
      2. 14-2. Generating Host Keys
        1. Problem
        2. Solution
        3. How It Works
      3. 14-3. Logging On Securely
        1. Problem
        2. Solution
        3. How It Works
      4. 14-4. Copying Files Securely
        1. Problem
        2. Solution
        3. How It Works
      5. 14-5. Authenticating Through Public Keys
        1. Problem
        2. Solution
        3. How It Works
      6. 14-6. Configuring a Promptless Logon
        1. Problem
        2. Solution
        3. How It Works
    25. Chapter 15: Managing X Window
      1. 15-1. Configuring an X Server
        1. Problem
        2. Solution
        3. How It Works
      2. 15-2. Starting an X Server
        1. Problem
        2. Solution
        3. How It Works
      3. 15-3. Stopping the X Server
        1. Problem
        2. Solution
        3. How It Works
      4. 15-4. Displaying an X Client on a Remote Server
        1. Problem
        2. Solution
        3. How It Works
      5. 15-5. Tunneling X Over SSH
        1. Problem
        2. Solution
        3. How It Works
      6. 15-6. Manipulating the Terminal Emulator for X Windows
        1. Problem
        2. Solution
        3. How It Works
    26. Chapter 16: Managing Remote Servers with VNC
      1. 16-1. Downloading the VNC Software
        1. Problem
        2. Solution
        3. How It Works
      2. 16-2. Installing the VNC Software
        1. Problem
        2. Solution
        3. How It Works
      3. 16-3. Manually Starting and Stopping the VNC Server
        1. Problem
        2. Solution
        3. How It Works
      4. 16-4. Automatically Starting the VNC Server on Linux
        1. Problem
        2. Solution
        3. How It Works
      5. 16-5. Automatically Starting the VNC Server on Solaris
        1. Problem
        2. Solution
        3. How It Works
      6. 16-6. Starting the VNC Viewer
        1. Problem
        2. Solution
        3. How It Works
      7. 16-7. Securing a VNC Connection
        1. Problem
        2. Solution
        3. How It Works
      8. 16-8. Accessing VNC via a Proxy Server
        1. Problem
        2. Solution
        3. How It Works
      9. 16-9. Running X Applications with VNC
        1. Problem
        2. Solution
        3. How It Works
      10. 16-10. Troubleshooting VNC
        1. Problem
        2. Solution
        3. How It Works
    27. Appendix A: RAID Concepts
      1. Understanding RAID
        1. Defining Array, Stripe Width, Stripe Size, Chunk Size
        2. RAID 0
        3. RAID 1
      2. Generating Parity
        1. RAID 4
        2. RAID 5
      3. Building Hybrid (Nested) RAID Devices
        1. RAID 0+1
        2. RAID 1+0
        3. RAID 5+0
      4. Determining Disk Requirements
      5. Capacity Planning
    28. Appendix B: Server Log Files
      1. Managing Linux Log Files
        1. Rotating Log Files
        2. Setting Up a Custom Log Rotation
        3. Monitoring Log Files
      2. Managing Solaris Log Files
        1. Viewing System Message Log Files
        2. Rotating Solaris Log Files
      3. Summary
    29. Index
    3.14.80.45