Concepts And Administration - Oracle

Transcription

Oracle Data GuardConcepts and Administration12c Release 1(12.1)E48552-08July 2017

Oracle Data Guard Concepts and Administration, 12c Release 1(12.1)E48552-08Copyright 1999, 2017, Oracle and/or its affiliates. All rights reserved.Primary Author: Kathy RichContributors: Andy Adams, Beldalker Anand, Chipper Brown, Larry Carpenter, Jin-Jwei Chen, LaurenceClarke, Jeff Detjen, Ray Dutcher, David Gagne, B.G. Garin, Mahesh Girkar, Yuhong Gu, Joydip Kundu,Steven Lee, Steven Lim, Nitin Karkhanis, Goutam Kulkarni, Jonghyun Lee, Yunrui Li, Shashi Mangalat,Steven McGee, Bob McGuirk, Joe Meeks, Steve Moriarty, Muthu Olagappan, Ashish Ray, Mike Schloss,Mike Smith, Lawrence To, Stephen Vivian, Doug Voss, Hongjie YangThis software and related documentation are provided under a license agreement containing restrictions onuse and disclosure and are protected by intellectual property laws. Except as expressly permitted in yourlicense agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify,license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.Reverse engineering, disassembly, or decompilation of this software, unless required by law forinteroperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free. Ifyou find any errors, please report them to us in writing.If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it onbehalf of the U.S. Government, then the following notice is applicable:U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are"commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agencyspecific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of theprograms, including any operating system, integrated software, any programs installed on the hardware,and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications thatmay create a risk of personal injury. If you use this software or hardware in dangerous applications, then youshall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure itssafe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of thissoftware or hardware in dangerous applications.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks oftheir respective owners.Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks areused under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron,the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced MicroDevices. UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products,and services from third parties. Oracle Corporation and its affiliates are not responsible for and expresslydisclaim all warranties of any kind with respect to third-party content, products, and services unless otherwiseset forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not beresponsible for any loss, costs, or damages incurred due to your access to or use of third-party content,products, or services, except as set forth in an applicable agreement between you and Oracle.

ContentsPrefaceAudiencexixDocumentation AccessibilityxixRelated DocumentsxixConventionsxxChanges in This Release for Oracle Data Guard Concepts andAdministrationChanges in Oracle Database 12c Release 1 (12.1.0.2)xxiChanges in Oracle Database 12c Release 1 (12.1.0.1)xxiPart I1Concepts and AdministrationIntroduction to Oracle Data Guard1.11.21.3Oracle Data Guard Configurations1-11.1.1Primary Database1-21.1.2Standby Databases1-21.1.3Far Sync Instances1-31.1.4Zero Data Loss Recovery Appliance1-31.1.5Configuration Example1-4Oracle Data Guard Services1-41.2.1Redo Transport Services1-51.2.2Apply Services1-51.2.3Role Transitions1-6Oracle Data Guard Broker1-61.3.1Using Oracle Enterprise Manager Cloud Control1-71.3.2Using the Oracle Data Guard Command-Line Interface1-71.4Oracle Data Guard Protection Modes1-81.5Client Failover1-91.5.1Application Continuity1-9iii

21.6Oracle Data Guard and Complementary Technologies1-101.7Summary of Oracle Data Guard Benefits1-12Getting Started with Oracle Data Guard2.1Standby Database Types2.1.1Physical Standby Databases2-12.1.2Logical Standby Databases2-22.1.3Snapshot Standby Databases2-32.2User Interfaces for Administering Oracle Data Guard Configurations2-42.3Oracle Data Guard Operational Prerequisites2-52.3.1Hardware and Operating System Requirements2-52.3.2Oracle Software Requirements2-52.4Standby Database Directory Structure Considerations2-72.5Moving the Location of Online Data Files2-92.5.132-1Restrictions When Moving the Location of Online Data Files2-10Creating a Physical Standby Database3.13.2Preparing the Primary Database for Standby Database Creation3-23.1.1Enable Forced Logging3-23.1.2Configure Redo Transport Authentication3-23.1.3Configure the Primary Database to Receive Redo Data3-33.1.4Set Primary Database Initialization Parameters3-43.1.5Enable Archiving3-6Step-by-Step Instructions for Creating a Physical Standby ting a Physical Standby Task 1: Create a Backup Copy of thePrimary Database Data Files3-7Creating a Physical Standby Task 2: Create a Control File for theStandby Database3-7Creating a Physical Standby Task 3: Create a Parameter File for theStandby Database3-8Creating a Physical Standby Task 4: Copy Files from the PrimarySystem to the Standby System3-10Creating a Physical Standby Task 5: Set Up the Environment to Supportthe Standby Database3-10Creating a Physical Standby Task 6: Start the Physical StandbyDatabase3-12Creating a Physical Standby Task 7: Verify the Physical StandbyDatabase Is Performing Properly3-123.3Creating a Physical Standby: Post-Creation Steps3-133.4Creating a Physical Standby of a CDB3-13iv

3.54Creating a PDB in a Primary Database3-15Creating a Logical Standby Database4.1Prerequisite Conditions for Creating a Logical Standby Database4.1.1Determine Support for Data Types and Storage Attributes for Tables4.1.2Ensure Table Rows in the Primary Database Can Be Uniquely Identified4-14-24-24.2Step-by-Step Instructions for Creating a Logical Standby Database4.2.14.2.24.2.34-3Creating a Logical Standby Task 1: Create a Physical StandbyDatabase4-4Creating a Logical Standby Task 2: Stop Redo Apply on the PhysicalStandby Database4-4Creating a Logical Standby Task 3: Prepare the Primary Database toSupport a Logical Standby Database4-44.2.3.1Prepare the Primary Database for Role Transitions4-54.2.3.2Build a Dictionary in the Redo Data4-64.2.4Creating a Logical Standby Task 4: Transition to a Logical StandbyDatabase4-74.2.4.1Convert to a Logical Standby Database4-74.2.4.2Adjust Initialization Parameters for the Logical Standby Database4-84.2.5Creating a Logical Standby Task 5: Open the Logical Standby Database4-104.2.654-124.3Creating a Logical Standby: Post-Creation Steps4-124.4Creating a Logical Standby of a CDB4-13Far Sync5.15.25.36Creating a Logical Standby Task 6: Verify the Logical StandbyDatabase Is Performing ProperlyCreating a Far Sync Instance5-15.1.1Creating and Configuring a Far Sync Instance5-25.1.2Configuring an ALTERNATE Destination5-5Additional Configurations5-65.2.1Maintaining Protection After a Role Change5-65.2.2Far Sync Instance High Availability5-7Supported Protection Modes for Far Sync Instances5-95.3.1Far Sync Instances in Maximum Availability Mode Configurations5-95.3.2Far Sync Instances in Maximum Performance Mode Configurations5-9Oracle Data Guard Protection Modes6.1Oracle Data Guard Protection Modes6-1v

6.27Setting the Data Protection Mode of a Primary DatabaseRedo Transport Services7.1Introduction to Redo Transport Services7-17.2Configuring Redo Transport Services7-27.2.1Redo Transport SecurityRedo Transport Authentication Using SSL7-37.2.1.2Redo Transport Authentication Using a Password File7-3Configuring an Oracle Database to Send Redo Data7.2.2.17.2.37.37-37.2.1.17.2.27-4Viewing Attributes With V ARCHIVE DEST7-6Configuring an Oracle Database to Receive Redo Data7-67.2.3.1Managing Standby Redo Logs7-77.2.3.2Cases Where Redo Is Written Directly To an Archived Redo LogFile7-8Cascaded Redo Transport Destinations7.3.1Configuring a Terminal Destination7.3.2Cascading Scenarios7-87-97-107.3.2.1Cascading to a Physical Standby7-107.3.2.2Cascading to Multiple Physical Standbys7-117.4Data Protection Considerations for Cascading Standbys7-117.5Validating a Configuration7-117.6Monitoring Redo Transport Services7-127.6.1Monitoring Redo Transport Status7-127.6.2Monitoring Synchronous Redo Transport Response Time7-137.6.3Redo Gap Detection and Resolution7-147.6.3.17.6.47.786-3Manual Gap ResolutionRedo Transport Services Wait EventsTuning Redo Transport7-147-167-17Apply Services8.1Introduction to Apply Services8-18.2Apply Services Configuration Options8-18.2.1Using Real-Time Apply to Apply Redo Data Immediately8-28.2.2Specifying a Time Delay for the Application of Archived Redo Log Files8-38.2.2.18.3Using Flashback Database as an Alternative to Setting a TimeDelayApplying Redo Data to Physical Standby Databases8-48-48.3.1Starting Redo Apply8-58.3.2Stopping Redo Apply8-58.3.3Monitoring Redo Apply on Physical Standby Databases8-5vi

8.4Applying Redo Data to Logical Standby Databases8.4.1Starting SQL Apply8-68.4.2Stopping SQL Apply on a Logical Standby Database8-68.4.3Monitoring SQL Apply on Logical Standby Databases8-68.59Standby Considerations When Removing or Renaming a PDB at a Primary8-6Role Transitions9.1Introduction to Role Transitions9-29.1.1Preparing for a Role Transition9-29.1.2Choosing a Target Standby Database for a Role .1.5Role Transition Triggers9-89.2Role Transitions Involving Physical Standby Databases9.2.1Performing a Switchover to a Physical Standby Database9.2.2Performing a Failover to a Physical Standby Database9.3Role Transitions Involving Logical Standby Databases9-89-89-119-149.3.1Performing a Switchover to a Logical Standby Database9-149.3.2Performing a Failover to a Logical Standby Database9-179.4108-5Using Flashback Database After a Role Transition9-189.4.1Using Flashback Database After a Switchover9-199.4.2Using Flashback Database After a Failover9-19Managing Physical and Snapshot Standby Databases10.1Starting Up and Shutting Down a Physical Standby Database10-110.1.1Starting Up a Physical Standby Database10-110.1.2Shutting Down a Physical Standby Database10-210.2Opening a Physical Standby Database10.2.1Real-time Query10-210-310.2.1.1Monitoring Apply Lag in a Real-time Query Environment10-410.2.1.2Configuring Apply Lag Tolerance in a Real-time QueryEnvironment10-4Forcing Redo Apply Synchronization in a Real-time QueryEnvironment10-510.2.1.4Real-time Query Restrictions10-510.2.1.5Automatic Block Media Recovery10-610.2.1.6Manual Block Media Recovery10-710.2.1.7Tuning Queries on a Physical Standby Database10-710.2.1.8Adding Temp Files to a Physical Standby10-810.2.1.3vii

10.2.210.2.3DML Operations on Temporary Tables on Oracle Active Data GuardInstances10-8Using Sequences in Oracle Active Data Guard10-910.2.3.110.3Primary Database Changes That Require Manual Intervention at a PhysicalStandby10-1110-1310.3.1Adding a Data File or Creating a Tablespace10-1410.3.2Dropping Tablespaces and Deleting Data Files10-1410.3.2.1Using DROP TABLESPACE INCLUDING CONTENTS ANDDATAFILES10-1510.3.3Using Transportable Tablespaces with a Physical Standby Database10-1510.3.4Renaming a Data File in the Primary Database10-1610.3.5Add or Drop a Redo Log File Group10-1710.3.6NOLOGGING or Unrecoverable Operations10-1810.3.7Refresh the Password File10-1810.3.8Reset the TDE Master Encryption Key10-1910.4Recovering Through the OPEN RESETLOGS Statement10-1910.5Monitoring Primary, Physical Standby, and Snapshot Standby Databases10-2010.5.1Using Views to Monitor Primary, Physical, and Snapshot StandbyDatabases10-2110.5.1.1V DATABASE10-2210.5.1.2V MANAGED STANDBY10-2210.5.1.3V ARCHIVED LOG10-2210.5.1.4V LOG HISTORY10-2310.5.1.5V DATAGUARD STATUS10-2310.5.1.6V ARCHIVE DEST10-2310.6Tuning Redo Apply10-2310.7Managing a Snapshot Standby Database10-2310.7.111Session SequencesConverting a Physical Standby Database into a Snapshot StandbyDatabase10-2410.7.2Using a Snapshot Standby Database10-2410.7.3Converting a Snapshot Standby Database into a Physical StandbyDatabase10-25Managing a Logical Standby Database11.1Overview of the SQL Apply Architecture11.1.1Various Considerations for SQL Apply11-111-311.1.1.1Transaction Size Considerations11-311.1.1.2Pageout Considerations11-411.1.1.3Restart Considerations11-411.1.1.4DML Apply Considerations11-411.1.1.5DDL Apply Considerations11-5viii

11.1.1.6Password Verification Functions11-611.2Controlling User Access to Tables in a Logical Standby Database11-611.3Views Related to Managing and Monitoring a Logical Standby Database11-711.3.1DBA LOGSTDBY EVENTS View11-711.3.2DBA LOGSTDBY LOG View11-811.3.3V DATAGUARD STATS View11-911.3.4V LOGSTDBY PROCESS View11-911.3.5V LOGSTDBY PROGRESS View11-1011.3.6V LOGSTDBY STATE View11-1111.3.7V LOGSTDBY STATS View11-1211.4Monitoring a Logical Standby Databa

Changes in This Release for Oracle Data Guard Concepts and Administration Changes in Oracle Database 12c Release 1 (12.1.0.2) xxi Changes in Oracle Database 12c Release 1 (12.1.0.1) xxi Part I File Size: 2MBPage Count: 418