Professional Documents
Culture Documents
Note:.................................................................................................................... 1
Executive Overview.......................................................................................... 3
Introduction To Data Guard........................................................................... 3
Customer Requirements................................................................................... 4
Best Practices for Meeting Requirements...................................................... 5
A User Example............................................................................................ 5
Meeting the Recovery Point Objective...................................................... 7
Configuring Maximum Availability Protection Mode ............................................... 7
Creating the Data Guard Configuration .............................................................. 10
Meeting the Server Recovery Time Objective........................................ 10
Real Application Clusters ................................................................................. 10
Meeting the Site Recovery Time Objective............................................. 11
Configuring Real-Time Apply ........................................................................... 11
Large Object Performance Enhancements ........................................................... 12
Other Performance Enhancements .................................................................... 13
New Metrics to Monitor your RPO and RTO ...................................................... 13
Fast-start Failover ........................................................................................... 14
Meeting the High Availability Objective ................................................. 17
Zero Downtime Instantiation ........................................................................... 17
Rolling Oracle Upgrades .................................................................................. 20
Conclusion........................................................................................................ 22
Additional References..................................................................................... 22
EXECUTIVE OVERVIEW
This paper provides an in-depth review of Data Guard SQL Apply (Logical standby
database) utilizing significant new features in Oracle Database 10g. This paper
presents a strategy where SQL Apply is a significant element of a Business
Continuity strategy. This session will share best practices and user experience
deploying SQL Apply. Oracle Data Guard 10g Release 1 capabilities discussed
include: Zero Downtime standby instantiation, Zero Data Loss, Real Time Apply
and SQL Apply performance enhancements and improved LOB handling. This
paper also covers new Oracle Data Guard 10g Release 2 SQL Apply enhancements
that include new metrics to visibly verify that the service level agreements are being
met, automatic failover and reinstatement of the original primary, rolling upgrades
for database patch sets and major releases and improved manageability.
1 Maximum latency between a transaction on the production database and the result of
that transaction appearing in the standby database must not exceed 5 seconds.
A User Example
Thomson Legal & Regulatory is a subsidiary of The Thomson Corporation and a
global provider of integrated information solutions to legal, tax, accounting,
intellectual property, compliance, and business and government professionals.
Thomson Legal & Regulatory serves more than 1 million customers world wide
including all of the top 100 global law firms and all “Big 4”accounting firms. More
than 120,000 daily online users access over 53 million web site page views each
month. Headquartered in Eagan, MN, Thomson Legal and Regulatory maintains
two world-class data centers with over 200,000 square feet, 700 TB of enterprise
class storage, and eight diesel generators with 16MW of power backup.
In addition to sharing many of the same business continuity requirements discussed
above, their database technology challenges also include:
• Making solutions incrementally scalable
• Insuring a scaling strategy transparent to applications and developers
• Not sacrificing performance
• Improving workload management capabilities
• Making the environment easy to setup and administer
• Making it cheaper.
SQL
LGWR LNS RFS Apply
Standby
Online Redo Logs
Redo
Primary Logs Standby
Database Database
ARCH ARCH
Archived
Archived
Redo Logs
Redo Logs
The Maximum Availability protection mode requires that one standby be defined
and enabled using synchronous redo transport. The following
LOG_ARCHIVE_DEST attributes enable Maximum Availability protection mode:
To complete the configuration and enable a handshake between the two databases
the LOG_ARCHIVE_CONFIG parameter is added to both databases.
log_archive_config='DG_CONFIG=(wlp01a,wlp01z)'
Standby Redo Log Files (SRL), required for zero data loss protection, can be added
once the appropriate redo transport attributes have been set. The Standby Redo
Log files are only used by a standby database, but are configured on both primary
and standby databases in preparation for future role transitions.
The following statement is an example of adding a group of standby redo log files
to a standby database:
SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 2
2 ('/oradata/log1a.rdo') SIZE 500M;
The THREAD clause is required only to add one or more standby redo log file
groups to a specific primary database thread. If the THREAD clause is not used,
and the standby configuration uses Real Application Clusters (RAC), Data Guard
automatically assigns standby redo log file groups to threads at runtime, as they are
An up-to-date
Logical
Standby
Database
RFS LSP
Standby
Redo
Logs
Real Time
Apply
ARCH
Archived
Redo Logs
Reading from the standby redo log is only part of the work SQL Apply has to do to
actually transform the redo back into transactions that can be applied to the Logical
Standby database. The SQL Apply process architecture and redo flow is outlined
in Figure 4, below.
Standby
Redo Log
Threads
T2 Redo LCR
Records LCR
Reader Preparer : Builder
T3
Shared Pool
T4
Log Mining
Standby
Database Figure 4 – SQL Apply Process Architecture
2 Note that without the information identifying the row being modified, the apply
Fast-start Failover
Data Guard 10g Release 2 includes a new automatic failover feature, Fast-Start
Failover. Fast-start Failover continuously monitors the status of both the primary
and standby databases and automatically executes database failover and client
notification should it detect an outage at the primary database - no manual
intervention is required. By eliminating the requirement for manual intervention,
site failover can execute very fast. Oracle tests have shown that it is possible to
execute failover to a remote site in less than 15 seconds.
After a fast-start failover occurs, the old primary database is automatically
reconfigured as a new standby database upon reconnection to the configuration.
This enables Data Guard to restore disaster protection in the configuration easily,
without complex manual steps, improving the robustness of the disaster-recovery
features of Data Guard, as well as improving Data Guard manageability.
These new capabilities allow you to maintain uptime and increase the availability, as
well the robustness of disaster recovery. Plus, there is less need for manual
intervention, thereby reducing management costs.
A fast-start failover configuration is monitored by a separate Data Guard
“Observer” process. The Observer is a lightweight process integrated in the
DGMGRL client-side component and is installed on the Observer system using the
Oracle Client Administrator or the full Oracle Database kit. It runs on a different
computer from the primary or standby databases and the operating system on the
observer computer can be different from the operating system running on the
primary computer or target standby database computer. However, the operating
system for the primary database computer and all associated standby database
computers must be the same.
As shown in Figure 5, the Observer continuously monitors the fast-start failover
configuration to ensure the primary database is available. Once the observer is
enabled, no further user interaction is required.
Observer
Redo
If both the Observer and the standby database lose connectivity to the primary
database, the Observer waits for a configurable amount of time and then initiates a
fast-start failover without any human intervention.
In Figure 6, Disaster strikes the primary database and its network connections to
both the observer and the target standby database are lost. Upon detecting the
break in communication, the observer attempts to reestablish a connection with the
primary database for the amount of time defined by the Data Guard Broker
FastStartFailoverThreshold property before initiating a fast-start
failover.
Observer
Primary Site
Observer
Moreover, after the failover completes, once the Primary database is available again
it is automatically reinstated as a standby database in the new broker configuration
and redo transmission begins automatically (See Figure 8). To return to the original
configuration a switchover can be performed.
Observer
Fast-start failover is a Data Guard 10g Release 2 feature. Fast-start failover can be
used only in a Data Guard Broker configuration and can be configured only
Recovery
1 5
3
On-Line
Backup
2 Restore
Transport Service
Physical Standby 6
Database! Activation
Once Step 7 is complete and the Logical Standby database is restarted, redo
transport from the Primary to the standby database resumes. All redo that was
generated at the Primary database during the time it took to complete steps 3
1 Create a Physical
Standby
2 3
Physical Standby
Database!
Primary Perform Dictionary Recover to
Database Build on Primary Logical
database Standby
4 Logical Standby
Database!
Start SQL Apply Services
The Dictionary build performed in step 2 on the primary database performs the
same functions as the Logical standby control file step in the previous Oracle
Database10g Release 1 method without requiring copying the standby control file
for a second time. The dictionary build also turns on supplemental logging
automatically, which was a manual step in previous releases.
Since Redo transport is already enabled and functioning (from the creation of the
Physical standby database) the redo generated by step 2 is sent to the Physical
standby but not yet applied.
By executing ALTER DATABASE RECOVER TO LOGICAL STANDBY <new dbname>; on
the Physical standby database in Step 3, the standby database is converted to a
Logical standby database and the steps to change the database name and
identification are performed automatically, leaving the standby database in an un-
4 Before executing step 2 you must stop the Redo Apply process on the Physical
standby database.
Redo Redo
Upgrade A B A B
5Note that the creation of the logical standby control file in Oracle Database10g
Release 1 and the Dictionary build in Oracle Database10g Release 2 will wait for all
active transactions to commit before the operation can complete.
ADDITIONAL REFERENCES
1. Oracle Maximum Availability Architecture
http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
2. Oracle Real Application Clusters
http://www.oracle.com/technology/products/database/clustering/index.html
3. Oracle Data Guard Overview
http://www.oracle.com/technology/deploy/availability/htdocs/DataGuardOverview.html
4. High Availability Customer Case Studies
http://www.oracle.com/technology/deploy/availability/htdocs/HA_CaseStudies.html
5. Data Guard Primary Site and Network Configuration Best Practices
http://www.oracle.com/technology/deploy/availability/pdf/MAA_DG_NetBestPrac.pdf
6. Oracle Data Guard Concepts and Administration
http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10823/toc.htm
7. Oracle Database 10g Best Practices: Data Guard SQL Apply
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gSQLApplyBestPrac
tices.pdf
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com