1/37
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
Changes in This Release for Oracle Data Guard Concepts and Administration
Changes in Oracle Database 12c Release 1 (12.1.0.2)
Changes in Oracle Database 12
c
Release 1 (12.1.0.1)
Part I Concepts and Administration
1
Introduction to Oracle Data Guard
1.1
Oracle Data Guard Configurations
1.1.1
Primary Database
1.1.2
Standby Databases
1.1.3
Far Sync Instances
1.1.4
Zero Data Loss Recovery Appliance
1.1.5
Configuration Example
1.2
Oracle Data Guard Services
1.2.1
Redo Transport Services
1.2.2
Apply Services
1.2.3
Role Transitions
1.3
Oracle Data Guard Broker
1.3.1
Using Oracle Enterprise Manager Cloud Control
1.3.2
Using the Oracle Data Guard Command-Line Interface
1.4
Oracle Data Guard Protection Modes
1.5
Client Failover
1.5.1
Application Continuity
1.6
Oracle Data Guard and Complementary Technologies
1.7
Summary of Oracle Data Guard Benefits
2
Getting Started with Oracle Data Guard
2.1
Standby Database Types
2.1.1
Physical Standby Databases
2.1.2
Logical Standby Databases
2.1.3
Snapshot Standby Databases
2.2
User Interfaces for Administering Oracle Data Guard Configurations
2.3
Oracle Data Guard Operational Prerequisites
2.3.1
Hardware and Operating System Requirements
2.3.2
Oracle Software Requirements
2.4
Standby Database Directory Structure Considerations
2.5
Moving the Location of Online Data Files
2.5.1
Restrictions When Moving the Location of Online Data Files
3
Creating a Physical Standby Database
3.1
Preparing the Primary Database for Standby Database Creation
3.1.1
Enable Forced Logging
3.1.2
Configure Redo Transport Authentication
3.1.3
Configure the Primary Database to Receive Redo Data
3.1.4
Set Primary Database Initialization Parameters
3.1.5
Enable Archiving
3.2
Step-by-Step Instructions for Creating a Physical Standby Database
3.2.1
Create a Backup Copy of the Primary Database Data Files
3.2.2
Create a Control File for the Standby Database
3.2.3
Create a Parameter File for the Standby Database
3.2.4
Copy Files from the Primary System to the Standby System
3.2.5
Set Up the Environment to Support the Standby Database
3.2.6
Start the Physical Standby Database
3.2.7
Verify the Physical Standby Database Is Performing Properly
3.3
Post-Creation Steps
3.4
Creating a Physical Standby of a CDB
3.5
Creating a PDB in a Primary Database
4
Creating a Logical Standby Database
4.1
Prerequisite Conditions for Creating a Logical Standby Database
4.1.1
Determine Support for Data Types and Storage Attributes for Tables
4.1.2
Ensure Table Rows in the Primary Database Can Be Uniquely Identified
4.2
Step-by-Step Instructions for Creating a Logical Standby Database
4.2.1
Create a Physical Standby Database
4.2.2
Stop Redo Apply on the Physical Standby Database
4.2.3
Prepare the Primary Database to Support a Logical Standby Database
4.2.3.1
Prepare the Primary Database for Role Transitions
4.2.3.2
Build a Dictionary in the Redo Data
4.2.4
Transition to a Logical Standby Database
4.2.4.1
Convert to a Logical Standby Database
4.2.4.2
Adjust Initialization Parameters for the Logical Standby Database
4.2.5
Open the Logical Standby Database
4.2.6
Verify the Logical Standby Database Is Performing Properly
4.3
Post-Creation Steps
4.4
Creating a Logical Standby of a CDB
5
Far Sync
5.1
Creating a Far Sync Instance
5.1.1
Creating and Configuring a Far Sync Instance
5.1.2
Configuring an ALTERNATE Destination
5.2
Additional Configurations
5.2.1
Maintaining Protection After a Role Change
5.2.2
Far Sync Instance High Availability
5.3
Supported Protection Modes for Far Sync Instances
5.3.1
Far Sync Instances in Maximum Availability Mode Configurations
5.3.2
Far Sync Instances in Maximum Performance Mode Configurations
6
Oracle Data Guard Protection Modes
6.1
Oracle Data Guard Protection Modes
6.2
Setting the Data Protection Mode of a Primary Database
7
Redo Transport Services
7.1
Introduction to Redo Transport Services
7.2
Configuring Redo Transport Services
7.2.1
Redo Transport Security
7.2.1.1
Redo Transport Authentication Using SSL
7.2.1.2
Redo Transport Authentication Using a Password File
7.2.2
Configuring an Oracle Database to Send Redo Data
7.2.2.1
Viewing Attributes With V$ARCHIVE_DEST
7.2.3
Configuring an Oracle Database to Receive Redo Data
7.2.3.1
Managing Standby Redo Logs
7.2.3.2
Cases Where Redo Is Written Directly To an Archived Redo Log File
7.3
Cascaded Redo Transport Destinations
7.3.1
Configuring a Terminal Destination
7.3.2
Cascading Scenarios
7.3.2.1
Cascading to a Physical Standby
7.3.2.2
Cascading to Multiple Physical Standbys
7.4
Data Protection Considerations for Cascading Standbys
7.5
Validating a Configuration
7.6
Monitoring Redo Transport Services
7.6.1
Monitoring Redo Transport Status
7.6.2
Monitoring Synchronous Redo Transport Response Time
7.6.3
Redo Gap Detection and Resolution
7.6.3.1
Manual Gap Resolution
7.6.4
Redo Transport Services Wait Events
7.7
Tuning Redo Transport
8
Apply Services
8.1
Introduction to Apply Services
8.2
Apply Services Configuration Options
8.2.1
Using Real-Time Apply to Apply Redo Data Immediately
8.2.2
Specifying a Time Delay for the Application of Archived Redo Log Files
8.2.2.1
Using Flashback Database as an Alternative to Setting a Time Delay
8.3
Applying Redo Data to Physical Standby Databases
8.3.1
Starting Redo Apply
8.3.2
Stopping Redo Apply
8.3.3
Monitoring Redo Apply on Physical Standby Databases
8.4
Applying Redo Data to Logical Standby Databases
8.4.1
Starting SQL Apply
8.4.2
Stopping SQL Apply on a Logical Standby Database
8.4.3
Monitoring SQL Apply on Logical Standby Databases
8.5
Standby Considerations When Removing or Renaming a PDB at a Primary
9
Role Transitions
9.1
Introduction to Role Transitions
9.1.1
Preparing for a Role Transition
9.1.2
Choosing a Target Standby Database for a Role Transition
9.1.3
Switchovers
9.1.4
Failovers
9.1.5
Role Transition Triggers
9.2
Role Transitions Involving Physical Standby Databases
9.2.1
Performing a Switchover to a Physical Standby Database
9.2.2
Performing a Failover to a Physical Standby Database
9.3
Role Transitions Involving Logical Standby Databases
9.3.1
Performing a Switchover to a Logical Standby Database
9.3.2
Performing a Failover to a Logical Standby Database
9.4
Using Flashback Database After a Role Transition
9.4.1
Using Flashback Database After a Switchover
9.4.2
Using Flashback Database After a Failover
10
Managing Physical and Snapshot Standby Databases
10.1
Starting Up and Shutting Down a Physical Standby Database
10.1.1
Starting Up a Physical Standby Database
10.1.2
Shutting Down a Physical Standby Database
10.2
Opening a Physical Standby Database
10.2.1
Real-time query
10.2.1.1
Monitoring Apply Lag in a Real-time Query Environment
10.2.1.2
Configuring Apply Lag Tolerance in a Real-time Query Environment
10.2.1.3
Forcing Redo Apply Synchronization in a Real-time Query Environment
10.2.1.4
Real-time Query Restrictions
10.2.1.5
Automatic Block Media Recovery
10.2.1.6
Manual Block Media Recovery
10.2.1.7
Tuning Queries on a Physical Standby Database
10.2.1.8
Adding Temp Files to a Physical Standby
10.2.2
DML Operations on Temporary Tables on Oracle Active Data Guard Instances
10.2.3
Using Sequences in Oracle Active Data Guard
10.2.3.1
Session Sequences
10.3
Primary Database Changes That Require Manual Intervention at a Physical Standby
10.3.1
Adding a Data File or Creating a Tablespace
10.3.2
Dropping Tablespaces and Deleting Data Files
10.3.2.1
Using DROP TABLESPACE INCLUDING CONTENTS AND DATAFILES
10.3.3
Using Transportable Tablespaces with a Physical Standby Database
10.3.4
Renaming a Data File in the Primary Database
10.3.5
Add or Drop a Redo Log File Group
10.3.6
NOLOGGING or Unrecoverable Operations
10.3.7
Refresh the Password File
10.3.8
Reset the TDE Master Encryption Key
10.4
Recovering Through the OPEN RESETLOGS Statement
10.5
Monitoring Primary, Physical Standby, and Snapshot Standby Databases
10.5.1
Using Views to Monitor Primary, Physical, and Snapshot Standby Databases
10.5.1.1
V$DATABASE
10.5.1.2
V$MANAGED_STANDBY
10.5.1.3
V$ARCHIVED_LOG
10.5.1.4
V$LOG_HISTORY
10.5.1.5
V$DATAGUARD_STATUS
10.5.1.6
V$ARCHIVE_DEST
10.6
Tuning Redo Apply
10.7
Managing a Snapshot Standby Database
10.7.1
Converting a Physical Standby Database into a Snapshot Standby Database
10.7.2
Using a Snapshot Standby Database
10.7.3
Converting a Snapshot Standby Database into a Physical Standby Database
11
Managing a Logical Standby Database
11.1
Overview of the SQL Apply Architecture
11.1.1
Various Considerations for SQL Apply
11.1.1.1
Transaction Size Considerations
11.1.1.2
Pageout Considerations
11.1.1.3
Restart Considerations
11.1.1.4
DML Apply Considerations
11.1.1.5
DDL Apply Considerations
11.1.1.6
Password Verification Functions
11.2
Controlling User Access to Tables in a Logical Standby Database
11.3
Views Related to Managing and Monitoring a Logical Standby Database
11.3.1
DBA_LOGSTDBY_EVENTS View
11.3.2
DBA_LOGSTDBY_LOG View
11.3.3
V$DATAGUARD_STATS View
11.3.4
V$LOGSTDBY_PROCESS View
11.3.5
V$LOGSTDBY_PROGRESS View
11.3.6
V$LOGSTDBY_STATE View
11.3.7
V$LOGSTDBY_STATS View
11.4
Monitoring a Logical Standby Database
11.4.1
Monitoring SQL Apply Progress
11.4.2
Automatic Deletion of Log Files
11.5
Customizing a Logical Standby Database
11.5.1
Customizing Logging of Events in the DBA_LOGSTDBY_EVENTS View
11.5.2
Using DBMS_LOGSTDBY.SKIP to Prevent Changes to Specific Schema Objects
11.5.3
Setting up a Skip Handler for a DDL Statement
11.5.4
Modifying a Logical Standby Database
11.5.4.1
Performing DDL on a Logical Standby Database
11.5.4.2
Modifying Tables That Are Not Maintained by SQL Apply
11.5.5
Adding or Re-Creating Tables On a Logical Standby Database
11.6
Managing Specific Workloads In the Context of a Logical Standby Database
11.6.1
Importing a Transportable Tablespace to the Primary Database
11.6.2
Using Materialized Views
11.6.3
How Triggers and Constraints Are Handled on a Logical Standby Database
11.6.4
Using Triggers to Replicate Unsupported Tables
11.6.5
Recovering Through the Point-in-Time Recovery Performed at the Primary
11.6.6
Running an Oracle Streams Capture Process on a Logical Standby Database
11.7
Using Extended Datatype Support During Replication
11.7.1
How EDS-Based Replication Works
11.7.2
Enabling EDS-Based Replication At a Logical Standby
11.7.3
Removing EDS-Based Replication From a Logical Standby
11.7.4
How EDS-Based Replication Handles Skip Rules
11.7.5
How EDS-Based Replication Handles DDL
11.7.5.1
Enabling and Disabling Automatic DDL Handling
11.7.5.2
Manually Handling DDL
11.8
Tuning a Logical Standby Database
11.8.1
Create a Primary Key RELY Constraint
11.8.2
Gather Statistics for the Cost-Based Optimizer
11.8.3
Adjust the Number of Processes
11.8.3.1
Adjusting the Number of APPLIER Processes
11.8.3.2
Adjusting the Number of PREPARER Processes
11.8.4
Adjust the Memory Used for LCR Cache
11.8.5
Adjust How Transactions are Applied On the Logical Standby Database
11.9
Backup and Recovery in the Context of a Logical Standby Database
12
Using RMAN to Back Up and Restore Files
12.1
About RMAN File Management in an Oracle Data Guard Configuration
12.1.1
Interchangeability of Backups in an Oracle Data Guard Environment
12.1.2
Association of Backups in an Oracle Data Guard Environment
12.1.3
Accessibility of Backups in an Oracle Data Guard Environment
12.2
About RMAN Configuration in an Oracle Data Guard Environment
12.3
Recommended RMAN and Oracle Database Configurations
12.3.1
Oracle Database Configurations on Primary and Standby Databases
12.3.2
RMAN Configurations at the Primary Database
12.3.3
RMAN Configurations at a Standby Database Where Backups are Performed
12.3.4
RMAN Configurations at a Standby Where Backups Are Not Performed
12.4
Backup Procedures
12.4.1
Using Disk as Cache for Tape Backups
12.4.1.1
Commands for Daily Tape Backups Using Disk as Cache
12.4.1.2
Commands for Weekly Tape Backups Using Disk as Cache
12.4.2
Performing Backups Directly to Tape
12.4.2.1
Commands for Daily Backups Directly to Tape
12.4.2.2
Commands for Weekly Backups Directly to Tape
12.5
Registering and Unregistering Databases in an Oracle Data Guard Environment
12.6
Reporting in an Oracle Data Guard Environment
12.7
Performing Backup Maintenance in an Oracle Data Guard Environment
12.7.1
Changing Metadata in the Recovery Catalog
12.7.2
Deleting Archived Logs or Backups
12.7.3
Validating Recovery Catalog Metadata
12.8
Recovery Scenarios in an Oracle Data Guard Environment
12.8.1
Recovery from Loss of Files on the Primary or Standby Database
12.8.2
Recovery from Loss of Online Redo Log Files
12.8.3
Incomplete Recovery of the Primary Database
12.8.4
Actions Needed on Standby After TSPITR or Tablespace Plugin at Primary
12.9
Additional Backup Situations
12.9.1
Standby Databases Too Geographically Distant to Share Backups
12.9.2
Standby Database Does Not Contain Data Files, Used as a FAL Server
12.9.3
Standby Database File Names Are Different From Primary Database
12.10
Restoring and Recovering Files Over the Network
12.11
RMAN Support for CDBs In an Oracle Data Guard Environment
13
Using SQL Apply to Upgrade the Oracle Database
13.1
Benefits of a Rolling Upgrade Using SQL Apply
13.2
Requirements to Perform a Rolling Upgrade Using SQL Apply
13.3
Figures and Conventions Used in the Upgrade Instructions
13.4
Performing a Rolling Upgrade By Creating a New Logical Standby Database
13.5
Performing a Rolling Upgrade With an Existing Logical Standby Database
13.6
Performing a Rolling Upgrade With an Existing Physical Standby Database
14
Using DBMS_ROLLING to Perform a Rolling Upgrade
14.1
Concepts New to Rolling Upgrades
14.2
Overview of Using DBMS_ROLLING
14.3
Planning a Rolling Upgrade
14.4
Performing a Rolling Upgrade
14.5
Monitoring a Rolling Upgrade
14.6
Rolling Back a Rolling Upgrade
14.7
Handling Role Changes That Occur During a Rolling Upgrade
14.8
Examples of Rolling Upgrades
15
Oracle Data Guard Scenarios
15.1
Configuring Logical Standby Databases After a Failover
15.1.1
When the New Primary Database Was Formerly a Physical Standby Database
15.1.2
When the New Primary Database Was Formerly a Logical Standby Database
15.2
Converting a Failed Primary Into a Standby Database Using Flashback Database
15.2.1
Flashing Back a Failed Primary Database into a Physical Standby Database
15.2.2
Flashing Back a Failed Primary Database into a Logical Standby Database
15.2.3
Flashing Back a Logical Standby Database to a Specific Applied SCN
15.3
Using Flashback Database After Issuing an Open Resetlogs Statement
15.3.1
Flashing Back a Physical Standby Database to a Specific Point-in-Time
15.3.2
Flashing Back a Logical Standby Database to a Specific Point-in-Time
15.4
Recovering After the NOLOGGING Clause Is Specified
15.4.1
Recovery Steps for Logical Standby Databases
15.4.2
Recovery Steps for Physical Standby Databases
15.4.3
Determining If a Backup Is Required After Unrecoverable Operations
15.5
Creating a Standby Database That Uses OMF or Oracle ASM
15.6
Recovering From Lost-Write Errors on a Primary Database
15.7
Converting a Failed Primary into a Standby Database Using RMAN Backups
15.7.1
Converting a Failed Primary into a Physical Standby Using RMAN Backups
15.7.2
Converting a Failed Primary into a Logical Standby Using RMAN Backups
15.8
Changing the Character Set of a Primary Without Re-Creating Physical Standbys
15.9
Actions Needed On a Standby After a PDB PITR On a Primary
Part II Reference
16
Initialization Parameters
17
LOG_ARCHIVE_DEST_n Parameter Attributes
AFFIRM and NOAFFIRM
ALTERNATE
COMPRESSION
DB_UNIQUE_NAME
DELAY
ENCRYPTION
LOCATION and SERVICE
MANDATORY
MAX_CONNECTIONS
MAX_FAILURE
NET_TIMEOUT
NOREGISTER
REOPEN
SYNC and ASYNC
TEMPLATE
VALID_FOR
18
SQL Statements Relevant to Oracle Data Guard
18.1
ALTER DATABASE Statements
18.2
ALTER SESSION Statements
18.3
ALTER SYSTEM Statements
19
Views Relevant to Oracle Data Guard
Part III Appendixes
A
Troubleshooting Oracle Data Guard
A.1
Common Problems
A.1.1
Renaming Data Files with the ALTER DATABASE Statement
A.1.2
Standby Database Does Not Receive Redo Data from the Primary Database
A.1.3
You Cannot Mount the Physical Standby Database
A.2
Log File Destination Failures
A.3
Handling Logical Standby Database Failures
A.4
Problems Switching Over to a Physical Standby Database
A.4.1
Switchover Fails Because Redo Data Was Not Transmitted
A.4.2
Switchover Fails with the ORA-01102 Error
A.4.3
Redo Data Is Not Applied After Switchover
A.4.4
Roll Back After Unsuccessful Switchover and Start Over
A.5
Problems Switching Over to a Logical Standby Database
A.5.1
Failures During the Prepare Phase of a Switchover Operation
A.5.1.1
Failure While Preparing the Primary Database
A.5.1.2
Failure While Preparing the Logical Standby Database
A.5.2
Failures During the Commit Phase of a Switchover Operation
A.5.2.1
Failure to Convert the Original Primary Database
A.5.2.2
Failure to Convert the Target Logical Standby Database
A.6
What to Do If SQL Apply Stops
A.7
Network Tuning for Redo Data Transmission
A.8
Slow Disk Performance on Standby Databases
A.9
Log Files Must Match to Avoid Primary Database Shutdown
A.10
Troubleshooting a Logical Standby Database
A.10.1
Recovering from Errors
A.10.1.1
DDL Transactions Containing File Specifications
A.10.1.2
Recovering from DML Failures
A.10.2
Troubleshooting SQL*Loader Sessions
A.10.3
Troubleshooting Long-Running Transactions
A.10.4
Troubleshooting ORA-1403 Errors with Flashback Transactions
B
Upgrading and Downgrading Databases in an Oracle Data Guard Configuration
B.1
Before You Upgrade the Oracle Database Software
B.2
Upgrading Oracle Database with a Physical Standby Database in Place
B.3
Upgrading Oracle Database with a Logical Standby Database in Place
B.4
Modifying the COMPATIBLE Initialization Parameter After Upgrading
B.5
Downgrading Oracle Database with No Logical Standby in Place
B.6
Downgrading Oracle Database with a Logical Standby in Place
C
Data Type and DDL Support on a Logical Standby Database
C.1
Datatype Considerations
C.1.1
Supported Datatypes in a Logical Standby Database
C.1.1.1
Compatibility Requirements
C.1.1.2
Opaque Type Restrictions
C.1.2
Unsupported Datatypes in a Logical Standby Database
C.2
Support for Data Types That Lack Native Redo-Based Support
C.3
Support for Transparent Data Encryption (TDE)
C.4
Support for Tablespace Encryption
C.5
Support For Row-level Security and Fine-Grained Auditing
C.5.1
Row-level Security
C.5.2
Fine-Grained Auditing
C.5.3
Skipping and Enabling PL/SQL Replication
C.6
Oracle Label Security
C.7
Oracle E-Business Suite
C.8
Supported Table Storage Types
C.9
Unsupported Table Storage Types
C.10
PL/SQL Supplied Packages Considerations
C.10.1
Supported PL/SQL Supplied Packages
C.10.2
Unsupported PL/SQL Supplied Packages
C.10.2.1
Support for DBMS_JOB
C.10.2.2
Support for DBMS_SCHEDULER
C.10.3
Handling XML and XDB PL/SQL Packages in Logical Standby
C.10.3.1
The DBMS_XMLSCHEMA Schema
C.10.3.2
The DBMS_XMLINDEX Package
C.10.3.3
Dealing With Unsupported PL/SQL Procedures
C.10.3.4
Manually Compensating for Unsupported PL/SQL
C.10.3.5
Compensating for Ordering Sensitive Unsupported PL/SQL
C.11
Unsupported Tables
C.11.1
Unsupported Tables During Rolling Upgrades
C.11.2
Unsupported Tables As a Result of DML Performed In a PL/SQL Function
C.12
Skipped SQL Statements on a Logical Standby Database
C.13
DDL Statements Supported by a Logical Standby Database
C.13.1
DDL Statements that Use DBLINKS
C.13.2
Replication of AUD$ and FGA_LOG$ on Logical Standbys
C.14
Distributed Transactions and XA Support
C.15
Support for SecureFiles LOBs
C.16
Support for Database File System (DBFS)
C.17
Character Set Considerations
C.18
Additional PL/SQL Package Support Available Only in the Context of DBMS_ROLLING Upgrades
D
Oracle Data Guard and Oracle Real Application Clusters
D.1
Configuring Standby Databases in an Oracle RAC Environment
D.1.1
Setting Up a Multi-Instance Primary with a Single-Instance Standby
D.1.2
Setting Up Oracle RAC Primary and Standby Databases
D.1.2.1
Configuring an Oracle RAC Standby Database to Receive Redo Data
D.1.2.2
Configuring an Oracle RAC Primary Database to Send Redo Data
D.2
Configuration Considerations in an Oracle RAC Environment
D.2.1
Format for Archived Redo Log Filenames
D.2.2
Data Protection Modes
E
Creating a Standby Database with Recovery Manager
E.1
Prerequisites
E.2
Overview of Standby Database Creation with RMAN
E.2.1
Purpose of Standby Database Creation with RMAN
E.2.2
Basic Concepts of Standby Creation with RMAN
E.2.2.1
Active Database and Backup-Based Duplication
E.2.2.2
DB_UNIQUE_NAME Values in an RMAN Environment
E.2.2.3
Recovery of a Standby Database
E.2.2.4
Standby Database Redo Log Files
E.2.2.5
Password Files for the Standby Database
E.3
Using the DUPLICATE Command to Create a Standby Database
E.3.1
Creating a Standby Database with Active Database Duplication
E.3.2
Creating a Standby Database with Backup-Based Duplication
F
Setting Archive Tracing
F.1
Setting the LOG_ARCHIVE_TRACE Initialization Parameter
G
Performing Role Transitions Using Old Syntax
G.1
SQL Syntax for Role Transitions Involving Physical Standbys
G.1.1
New Features When Using the Old Syntax
G.2
Role Transitions Involving Physical Standby Databases
G.2.1
Performing a Switchover to a Physical Standby Database Using Old Syntax
G.2.2
Performing a Failover to a Physical Standby Database Using Old Syntax
G.3
Troubleshooting Switchovers to Physical Standby Databases
G.3.1
Switchover Fails Because Redo Data Was Not Transmitted
G.3.2
Switchover Fails with the ORA-01102 Error
G.3.3
Redo Data Is Not Applied After Switchover
G.3.4
Roll Back After Unsuccessful Switchover and Start Over
Index
Scripting on this page enhances content navigation, but does not change the content in any way.