You are previewing Oracle Data Guard 11gR2 Administration Beginner's Guide.
O'Reilly logo
Oracle Data Guard 11gR2 Administration Beginner's Guide

Book Description

If you’re an Oracle Database Administrator it’s almost essential to know how to protect and preserve your data. This is the perfect primer to Data Guard that covers all the bases with a totally practical, user-friendly approach.

  • Understand the essentials and components of Oracle Data Guard

  • Configure your Data Guard environment using practical examples

  • Find solutions to the most common real-world Data Guard issues

  • Dedicated chapters for Data Guard best practices and Data Guard patching

  • See how Data Guard is integrated with the existing Oracle database cluster and backup environment

  • An easy to read, comprehensive guide with clear, step-by-step instructions

  • In Detail

    Data Guard is the high availability, disaster recovery and data replication solution for Oracle Databases.

    With the huge growth of Data Guard it’s getting harder to encounter an Oracle DBA not dealing with Data Guard. Since it’s a common DBA task to provide high availability of databases, Data Guard is a must-know topic for every Oracle Database Administrator.

    "Oracle Data Guard 11g R2 Beginner's Administration Guide" is a practical guide that provides all the information you will need to configure and maintain Data Guard. This book will show you what Data Guard can really do.

    By following the practical examples in this book, you’ll learn to set up your Data Guard Broker, the management framework for Data Guard configurations. Learn and implement different data protection modes, perform role transitions between databases (switchover and failover) and configure Active Data Guard. Next, we will dive into the features of Snapshot Standby. The book progresses into looking at Data Guard configuration with other Oracle products (such as EM, RAC, and RMAN) and patch databases in Data Guard. The final chapters will cover commonly encountered Data Guard issues and Data Guard best practices, which are very important to make a Data Guard configuration perfect and take maximum advantage of Data Guard properties.

    Table of Contents

    1. Oracle Data Guard 11gR2 Administration Beginner's Guide
      1. Table of Contents
      2. Oracle Data Guard 11gR2 Administration Beginner's Guide
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Time for action – heading
          1. What just happened?
          2. Pop quiz – heading
          3. Have a go hero – heading
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Getting Started
        1. What is Data Guard?
        2. Standby database
          1. Physical standby database
          2. Logical standby database
          3. Snapshot standby database
        3. Oracle Data Guard evolution
          1. Version 7.3 – stone age
          2. Version 8i – first age
          3. Version 9i – middle age
          4. Version 10g – new age
          5. Version 11g – modern age
        4. Oracle Data Guard architecture
          1. Data Guard services
            1. Redo transport services
              1. Protection modes
            2. Apply services
              1. Redo Apply (physical standby databases)
              2. Monitoring Redo Apply
        5. Time for action – monitoring Redo Apply
          1. What just happened?
          2. Pop quiz – real-time apply consideration
            1. SQL Apply (logical standby databases)
          3. Role transitions
            1. Switchover
            2. Failover
              1. Fast-start failover
          4. User interfaces for administering Data Guard
            1. SQL*Plus
            2. DGMGRL
            3. Enterprise Manager
        6. Time for action – using interfaces to monitor Data Guard
          1. What just happened?
          2. Data Guard background processes
        7. Other replication solutions and Data Guard
          1. Storage-based replication solutions
          2. GoldenGate and Streams
        8. Summary
      9. 2. Configuring the Oracle Data Guard Physical Standby Database
        1. Preconfiguration for Data Guard
          1. Data loss consideration
          2. Network bandwidth consideration
          3. Preparing the primary database
            1. Archive log mode
        2. Time for action – enabling the archive log mode
          1. What just happened?
            1. Force logging
        3. Time for action – enabling force logging
          1. What just happened?
            1. Standby redo logs
        4. Time for action – configuring standby redo logs on primary
          1. What just happened?
            1. Fast recovery area (FRA)
        5. Time for action – enabling FRA
          1. What just happened?
            1. Understanding initialization parameters
            2. DB_NAME
            3. DB_UNIQUE_NAME
            4. LOG_ARCHIVE_CONFIG
            5. LOG_ARCHIVE_MAX_PROCESSES
            6. LOG_ARCHIVE_DEST_n
            7. LOCATION and SERVICE
            8. VALID_FOR
            9. SYNC and ASYNC
            10. AFFIRM and NOAFFIRM
            11. COMPRESSION
            12. MAX_CONNECTIONS
            13. MAX_FAILURE
            14. REOPEN
            15. NET_TIMEOUT
            16. DELAY
            17. LOG_ARCHIVE_DEST_STATE_n
          2. What just happened?
        6. Creating the physical standby database
          1. Standby database related initialization parameters
            1. FAL_SERVER
            2. STANDBY_FILE_MANAGEMENT
            3. DB_FILE_NAME_CONVERT
            4. LOG_FILE_NAME_CONVERT
          2. The physical standby database instance
        7. Time for action – starting the physical standby instance and making it ready for the RMAN duplicate
          1. What just happened?
          2. Using RMAN duplicate to create physical standby databases
        8. Time for action – running an RMAN duplicate
          1. What just happened?
        9. Post-installation steps
          1. Verifying the standby database configuration
        10. Time for action – verifying the standby database configuration
          1. What just happened?
          2. Managing Redo Apply
        11. Time for action – starting, stopping, and monitoring MRP
          1. What just happened?
          2. Verifying synchronization between the primary and standby databases
        12. Time for action – verifying synchronization between the primary and standby databases
          1. What just happened?
        13. Time for action – testing real-time apply
          1. What just happened?
          2. Have a go hero – checking the network latency effect on real-time apply
        14. Summary
      10. 3. Configuring Oracle Data Guard Logical Standby Database
        1. Logical standby database characteristics
          1. Not everything must be duplicated
          2. Use for reporting at all times
          3. Independent standby database objects
          4. Protecting writes on replicated standby tables
          5. Limitation for specific data types and objects
          6. High availability and disaster recovery considerations
        2. Preparation for the configuration
        3. Time for action – checking for the unsupported data types
          1. What just happened?
        4. Time for action – searching for and fixing any table row uniqueness problem
          1. What just happened?
        5. Creating a logical standby database
        6. Time for action – making a physical standby database environment ready for conversion
          1. What just happened?
        7. Time for action – converting a physical standby database into a logical standby database
          1. What just happened?
        8. Verifying the logical standby database
        9. Time for action – checking the redo transport service status
          1. What just happened?
        10. Time for action – checking the SQL Apply service status
          1. What just happened?
          2. Have a go hero – check the services in a broken configuration
        11. Customization and management in a logical standby database
          1. Selective replication in a logical standby database
        12. Time for action – working with skip rules on a logical standby database
          1. What just happened?
          2. Database Guard settings for the logical standby database
        13. Time for action – changing the Database Guard setting
          1. What just happened?
            1. Disabling database guard for a session
          2. Have a go hero – testing the NONE Database Guard mode
          3. Creating objects on the logical standby database
            1. Creating and re-creating tables
            2. Creating scheduler jobs
            3. Creating materialized views
        14. Time for action – creating objects on the logical standby database
          1. What just happened?
          2. Have a go hero – skip, disable guard, insert, instantiate, and disable skip
          3. Automatic deletion of archived logs
            1. Deletion of the foreign archived logs
              1. Files inside the fast recovery area
              2. Files outside the fast recovery area
            2. Deletion of the local archived logs
        15. Summary
      11. 4. Oracle Data Guard Broker
        1. Introduction to Data Guard broker
        2. Data Guard broker features and benefits
          1. Centralized and simple management
          2. Cloud Control integration
          3. Oracle Data Guard and RAC
          4. Role transition with Data Guard broker
          5. Data Guard fast-start failover
            1. Recommendation
        3. Data Guard broker components
          1. Oracle Data Guard broker server-side components
            1. Data Guard Monitor process (DMON)
            2. Configuration file
          2. Oracle Data Guard broker client-side components
            1. DGMGRL utility
            2. Enterprise Manager Cloud Control client
        4. Implementation of Oracle Data Guard broker
        5. Time for action – initial setup of Data Guard broker
          1. What just happened?
        6. Time for action – connecting to Data Guard broker
          1. What just happened?
        7. Time for action – basic monitoring with Data Guard broker
          1. What just happened?
        8. Management with Data Guard broker
          1. Enabling and disabling broker configuration
        9. Time for action – disabling broker configuration
          1. What just happened?
          2. Enabling and disabling a standby database
        10. Time for action – disabling and enabling database
          1. What just happened?
          2. Changing configuration and database properties using broker
          3. Have a go hero – more examples on property changes
        11. Time for action – changing the database name
          1. What just happened?
          2. Changing the state of the database
          3. Have a go hero – more examples on state changes
          4. Troubleshooting Data Guard broker
          5. Data Guard tracing
        12. Most Common Data Guard broker issues
          1. ORA-16797: database is not using a server parameter file
          2. ORA-10458:standby database requires recovery
          3. ORA-16737:the redo transport service for standby database "string" has an error
          4. ORA-16715:redo transport-related property string of standby database "string" is inconsistent
          5. ORA-12514:TNS:listener does not currently know of service requested in connect descriptor
            1. Current listener description
        13. Oracle Data Guard fast-start failover
        14. Time for action – configuring fast-start failover
          1. What just happened?
          2. Troubleshooting observer configuration
          3. Script to stop and start observer
        15. Summary
      12. 5. Data Guard Protection Modes
        1. The Maximum Protection mode
        2. The Maximum Performance mode
        3. The Maximum Availability mode
        4. Choosing the correct mode for your requirements
        5. Changing Data Guard protection mode
        6. Time for action – changing the protection mode with SQL*Plus
          1. What just happened?
        7. Time for action – changing the protection mode with Data Guard broker
          1. What just happened?
          2. Have a go hero - protection mode transitions with DGMGRL
        8. Time for action – changing the protection mode with Enterprise Manager Cloud Control
          1. What just happened?
          2. Pop quiz – precautions for primary database availability issue in the Maximum Protection mode
        9. Summary
      13. 6. Data Guard Role Transitions
        1. Role transition considerations
        2. Switchover
          1. Performing switchover with a physical standby database using SQL*Plus
        3. Time for action – preliminary tests before performing switchover
          1. What just happened?
        4. Time for action – switchover with a physical standby using SQL*Plus
          1. Performing switchover with a physical standby database using broker
        5. Time for action – switchover with a physical standby using broker
          1. What just happened?
          2. Performing switchover with a physical standby database using EM Cloud Control
        6. Time for action – switchover with a physical standby using EM Cloud Control
          1. Performing switchover with a logical standby database using SQL*Plus
        7. Time for action – switchover with a logical standby database using SQL*Plus
          1. What just happened?
          2. Pop quiz
          3. Performing switchover with a logical standby database using broker
        8. Time for action – switchover with a logical standby using broker
          1. What just happened?
        9. Failover
          1. Performing failover with a physical standby database
        10. Time for action – failover with a physical standby database using SQL*Plus
          1. Have a go hero
          2. Performing failover with a logical standby database
        11. Time for action – failover with a logical standby using broker
          1. What just happened?
        12. Summary
      14. 7. Active Data Guard, Snapshot Standby, and Advanced Techniques
        1. Oracle Active Data Guard
          1. Why Active Data Guard?
          2. Oracle Data Guard license
          3. Enabling Active Data Guard
        2. Time for action – enabling Active Data Guard if Redo Apply is running using SQL *PLUS
        3. Time for action – enabling Active Data Guard if the standby database is shut down
        4. Time for action – enabling Active Data Guard using broker
          1. What just happened?
          2. Monitoring Active Data Guard
            1. From primary
            2. From standby
          3. Active Data Guard with applications
            1. Active Data Guard with PeopleSoft
        5. Time for action – Active Data Guard with PeopleSoft
          1. Active Data Guard with EBS
          2. Active Data Guard with TopLink
          3. Active Data Guard with Oracle BI
          4. Active Data Guard with SAP
          5. Active Data Guard features
            1. EXPDP from standby database using NETWORK_LINK (ADG)
        6. Time for action – exporting a database backup from Active Data Guard
          1. What just happened?
        7. Time for action – using the ASH report from the standby database
          1. What just happened?
          2. Have a go hero – running Statspack from a standby database
        8. Using a snapshot standby database
        9. Time for action – converting to a snapshot standby database
          1. What just happened?
        10. Time for action – converting to a physical standby database
          1. What just happened?
          2. Have a go hero – convert the physical standby to a snapshot and vice versa using broker
        11. Cascade standby databases
          1. Limitations with cascade standby database
        12. Time for action – cascade standby database
          1. What just happened?
        13. Advanced compression in Data Guard
        14. Time for action – enabling advanced compression
          1. What just happened?
        15. Preparation of standby on a cross-platform Data Guard
        16. Time for action – creating a cross-platform Data Guard setup
          1. What just happened?
        17. Data Guard tuning and wait events
          1. Network tuning
          2. Redo transport and apply tuning
          3. Data Guard wait events
        18. Summary
      15. 8. Integrating Data Guard with the Complete Oracle Environment
        1. The Oracle Enterprise Manager Cloud Control integration
        2. Time for action – adding the Data Guard configuration into Cloud Control
          1. What just happened?
          2. Have a go hero
          3. Cloud Control Data Guard administration home page
          4. Modifying the Data Guard configuration
        3. Time for action – enabling/disabling fast-start failover
          1. What just happened?
          2. Have a go hero
          3. Monitoring Data Guard performance
          4. Using Incident Manager to monitor Data Guard
        4. Time for action – setting the threshold and creating an incident for estimated failover time metric
          1. What just happened?
        5. RMAN integration
          1. Integration requirements and best practices
            1. Physical standby requirement
            2. RMAN Catalog requirement
            3. Using a different DB_UNIQUE_NAME
            4. General RMAN best practices
          2. RMAN settings for the Data Guard environment
            1. Registering primary database in the catalog
            2. Configuring RMAN settings for primary database:
            3. Configuring RMAN settings for standby database
            4. Checking the RMAN configuration
        6. Time for action – recovering a primary database using a standby database disk backup
          1. What just happened?
          2. Have a go hero
          3. Using block change tracking with Data Guard
        7. RAC integration
          1. A RAC primary database with a single instance standby database
          2. A RAC primary database with a RAC standby database
        8. Summary
      16. 9. Data Guard Configuration Patching
        1. What is patch and what are patch types?
          1. Interim patch
          2. CPU/SPU patches
          3. PSU patches
          4. Patch set
          5. Patching on Data Guard
          6. What just happened?
        2. Best practices of patching
        3. Upgrading OPatch
        4. Performing prerequisite checks of patch
        5. How to clean up patch history?
          1. What just happened?
        6. Patching on Data Guard configuration
          1. How to apply an interim/bug patch on logical standby?
        7. Time for action – applying a patch on logical standby
          1. What just happened?
          2. How to apply a PSU patch on physical standby database using broker?
        8. Time for action – applying PSU on a physical standby database
          1. Pop quiz
          2. What just happened?
          3. How to apply patch set on physical standby (11.2.0.1 to 11.2.0.3)?
        9. Time for action – patch set upgrade of physical standby
          1. What just happened?
          2. Have a go hero – in-place patch set installation
        10. Summary
      17. 10. Common Data Guard Issues
        1. Recreating the standby control file
        2. Time for action – recreating the standby control file
          1. What just happened?
        3. Dealing with redo transport authentication problems
        4. Time for action – changing the SYS password in a Data Guard environment
          1. Pop quiz – the redo transport authentication problem in only one instance of the primary database
          2. What just happened?
        5. Time for action – changing the redo transport user
          1. What just happened?
        6. Dealing with UNNAMED datafiles
        7. Time for action – resolving UNNAMED datafile errors
          1. What just happened?
          2. Have a go hero
        8. Closing a gap with an RMAN incremental backup
        9. Time for action – closing a gap with an RMAN incremental backup
          1. What just happened?
          2. Pop quiz – using a tape for SCN incremental backup
        10. Fixing NOLOGGING changes on the standby database
        11. Time for action – fixing NOLOGGING changes on a standby database with incremental datafile backups
          1. What just happened?
        12. Time for action – fixing NOLOGGING changes in the standby database with incremental database backups
          1. What just happened?
        13. Turning on Data Guard tracing
          1. Have a go hero
        14. Gathering diagnostic data
          1. Alert log and trace files
        15. Time for action – monitoring the database alert log using ADRCI
          1. What just happened?
          2. Data Guard broker logs
          3. Dynamic performance views
        16. Summary
      18. 11. Data Guard Best Practices
        1. Configuring a connection failover
          1. Transparent Application Failover (TAF)
            1. Configuring the client-side TAF
            2. Configuring the server-side TAF
          2. Fast Connection Failover (FCF)
        2. Time for action – configuring FCF for JDBC connections
          1. What just happened?
          2. Fast Application Notification (FAN)
          3. What just happened?
        3. The archived log deletion policy on the standby database
        4. Time for action – the recommended configuration for archived log maintenance on a standby database
          1. What just happened?
        5. Using flashback on a standby database
        6. Time for action – using flashback on a standby database
          1. What just happened?
        7. Database rolling upgrade using the transient logical standby database
        8. Time for action – performing a rolling upgrade using the transient logical standby database
          1. What just happened?
          2. Have a go hero – one last switchover
        9. Corruption detection, prevention, and automatic repair with Oracle Data Guard
          1. DB_BLOCK_CHECKSUM
          2. DB_BLOCK_CHECKING
          3. DB_LOST_WRITE_PROTECT
          4. Automatic block media repair
        10. Summary
      19. Pop Quiz Answers
        1. Chapter 1, Getting Started
          1. Pop quiz – real-time apply consideration
        2. Chapter 5, Data Guard Protection Modes
          1. Pop quiz – precautions for primary database availability issue in maximum protection mode
        3. Chapter 6, Data Guard Role Transitions
          1. Pop quiz
        4. Chapter 9, Data Guard Configuration Patching
          1. Pop quiz
        5. Chapter 10, Common Data Guard Issues
          1. Pop quiz – redo transport authentication problem in only one instance of primary database
          2. Pop quiz – using tape for SCN incremental backup
      20. Index