Oracle Data Guard
Maximum Data Protection at
Minimum Cost
Agenda
HA / DR Challenges
Data Guard Architecture & Features
Data Guard 10g New Features
Maximum Availability Architecture
Summary
Cost of Downtime
Hotel Reservation System: $100K an hour
Online Auction: $225K an hour
Worldwide Consolidated Enterprise System: $1.2M an hour
Credit Card Sales Authorization: $2.6M an hour
• Revenue
• Financial performance
• Productivity
• Damaged reputation
• Other expenses…
Causes of Downtime
System
Failures
Storage Failures
Unplanned
Downtime Data
Human Errors
Failures Corruptions
Site Failures
System
Planned Changes
Downtime
Data
Changes
Oracle’s Integrated HA Solutions
System Real Application Clusters
Failures
Unplanned Automatic Storage Management
Downtime Data
Flashback
RMAN & Flash Recovery Area
Failures H.A.R.D
Data Guard
System Online Reconfiguration
Planned Changes Rolling Upgrades
Downtime
Data Online Redefinition
Changes
Oracle’s Integrated HA Solutions
System Real Application Clusters
Failures
Unplanned Automatic Storage Management
Downtime Data
Flashback
RMAN & Flash Recovery Area
Failures H.A.R.D
Data Guard
System Online Reconfiguration
Planned Changes Rolling Upgrades
Downtime
Data Online Redefinition
Changes
Agenda
HA / DR Challenges
Data Guard Architecture & Features
Data Guard 10g New Features
Maximum Availability Architecture
Summary
What is Oracle Data Guard?
Oracle’s disaster recovery solution for Oracle data
Feature of Oracle Database Enterprise Edition (EE)
Automates the creation and maintenance of one or more
transactionally consistent copies (standby) of the production (or
primary) database
If the primary database becomes unavailable (disasters,
maintenance), a standby database can be activated and assume
the primary role
Requires same releases of Oracle database and operating system
for the primary and standby servers
Oracle Data Guard Focus
Data Failures & Site Disasters:
– Data Protection
– Data Availability
– Data Recovery
Data is the core asset of
All 3 are important! the enterprise!
• Also addresses human errors & planned maintenances
Oracle Data Guard Architecture
Physical Standby
Database
Sync or Async
Redo Shipping Backup
Production
Database Redo Apply DIGITAL DATA STORAGE
DIGITAL DATA STORAGE
Network
Broker
Logical Standby
Transform Database Open for
Redo to SQL Reports
SQL
Apply
Additional
Indexes & MVs
Data Guard Process Architecture (9i)
Oracle Net Physical/Logical
Transactions Standby
Database
LGWR RFS MRP/ LSP
Online Redo Logs
FAL
Primary Standby
Transform Redo
Redo
Database Logs
to SQL for
SQL Apply
Backup /
ARCH Reports
Archived Redo Logs ARCH
Archived Redo Logs
Data Guard Redo Apply
Primary Data Guard Physical Standby
Database Broker Database
Redo Apply Backup
Network DIGITAL DATA STORAGE
Redo Shipment
Standby
Redo Logs
Physical Standby Database is a block-for-block copy of the primary database
Uses the database recovery functionality to apply changes
Can be opened in read-only mode for reporting/queries
Can also be used for backups, offloading production database
Data Guard SQL Apply
Additional
Indexes &
Materialized Views
Primary Logical Standby
Database Data Guard Database
Broker
Transform Redo
to SQL and Apply
Continuously
Network Open for Reports
Redo Shipment Standby
Redo Logs
Logical Standby Database is an open, independent, active database
Contains the same logical information (rows) as the production database
Physical organization and structure can be very different
Can host multiple schemas
Can be queried for reports while logs are being applied via SQL
Can create additional indexes and materialized views for better query performance
Switchover and Failover
Primary and Standby role transitions
Switchover
– Planned role reversal
– No database reinstantiation required
– Used for maintenance of OS or hardware
Failover
– Unplanned failure (e.g. disasters) of primary
– Primary database must be reinstantiated / flashed back [10g]
Initiated using simple SQL / GUI interface
Data Guard automates the processes involved
Flexible Data Protection Modes
Protection Mode Data Loss Protection Redo Shipment
Maximum Protection Zero Data Loss LGWR SYNC – Synchronous
Double Failure Protection redo shipping to >= 2 sites
Maximum Availability Zero Data Loss LGWR SYNC – Synchronous
Single Failure Protection redo shipping
Maximum Performance Minimal data loss LGWR ASYNC or ARCH –
Asynchronous redo shipping
E.g. ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;
Balance cost, availability, performance, and transaction protection
Automatic Resynchronization
Network connectivity problems may occur
Data Guard automatically resynchronizes standbys after
network connectivity restored
– Implicit
ARCH process idling away on the primary ‘pings’ all standbys
on a regular basis to see if they are missing any redo data
If so it sends them the missing redo data
– Explicit
Gap discovered during apply process in physical standby
Based on FAL_SERVER and FAL_CLIENT settings, primary
notified, and it sends missing redo data
Agenda
HA / DR Challenges
Data Guard Architecture & Features
Data Guard 10g New Features
Maximum Availability Architecture
Summary
Data Guard 10g New Features
General new features
– Real Time Apply
– Flashback Database Integration
SQL Apply new features
– Zero Downtime Instantiation
– Support for additional datatypes
– Rolling Upgrades
Data Guard Broker & Enterprise Manager new features
– RAC integration
– Simplified browser-based interface focused on best practices
Real Time Apply
An up-to-date
Oracle Net Physical/Logical
Transactions
Standby
Database
LGWR RFS MRP/ LSP
Standby
Redo
Logs
Online
Redo Real Time
Logs
Primary Apply
ARCH
Database
ARCH
Archived
Redo Logs
Archived
Redo Logs
Oracle 11g New Features
Active Data Guard.
Up to 30 DR sites (11gR2).
Existing Site Recovery Tradeoffs
Primary Database Standby Database Reporting on
Redo delayed data
Shipment
Delayed
Apply
Log apply may be delayed to protect from user errors but:
– Switchover/Failover gets delayed
– Reports run on old data
After failing over to standby, production DB must be rebuilt
Enhanced DR with Flashback Database
Primary Database Real Time Standby Database
Real Time
Redo Apply Reporting
Shipment
No Delay!
Flashback Flashback
Log Log
Primary: No reinstantiation
after failover!
Flashback DB removes the need to delay application of logs
Flashback DB removes the need to reinstantiate primary after failover
Real-time apply enables real-time reporting on standby (at extra cost of
resources!)
SQL Apply Enhancements
Logical standby databases can now be created from an
online backup of the primary database
Support for additional datatypes:
– NCLOB
– LONG
– LONG RAW
– BINARY_FLOAT
– BINARY_DOUBLE
– IOT-s (without overflows and without LOB columns - mind Rolling
Upgrades)
SQL Apply – Rolling Database Upgrades
Upgrade
Redo Patch Set
Clients Upgrades
A B Logs A B
Queue
Major
Version X Version X X X+1 Release
1 2 Upgrades
Initial SQL Apply Config Upgrade node B to X+1
Redo Redo Cluster
Upgrade A B A B
Software &
Hardware
Upgrades
X+1 X+1 X X+1
4 Switchover to B, upgrade A 3 Run in mixed mode to test
Enterprise Manager New Features
Broker & EM can now create and manage configurations
that contain RAC primary and RAC standby databases
Streamlined browser-based interface that enables
complete standby database lifecycle management
Focus on:
– Ease of use
– Management based on best practices
– Pre-built integration with other HA feature
Example – Ease of Use
Creation of Data Guard Standby using Grid
Control: just some mouse-clicks
(I like vanilla ksh-scripting, though)
Example – Ease of Use
Switchover using Enterprise Manager is now
literally two mouse clicks
Switched!
Agenda
HA / DR Challenges
Data Guard Architecture & Features
Data Guard 10g New Features
Maximum Availability Architecture
Summary
Maximum Availability Architecture
Oracle recommended High Availability architecture
– HA blueprints based on Oracle technologies:
Database, Application Server, Enterprise Manager, …
– Evolves with new Oracle versions and features
– Based on HA requirements of customers
– Intended for Oracle customers interested in HA
Best practices to define and meet SLA requirements
– Architectural, configuration and operational best practices
– Minimize scheduled and unscheduled downtime
– Efficiently recover from outages and restore fault tolerance
– Hardware and OS independent
Unbreakable Architecture + Best Practices = Maximum Availability
MAA Best Practice Publications
Best Practices on:
RAC/ Data Guard configuration
Redo data transport mechanisms
Instance Recovery
Switchover/Failover
Media recovery
White papers1:
SQL Apply configuration MAA – detailed
Network configuration Media Recovery
Integration of HA technologies Site/Network configuration
Fast-Start Checkpointing
SQL Apply Best Practices
Role Management
1. Ref. http://otn.oracle.com/deploy/availability/htdocs/maa.htm for latest updates
Some Data Guard MAA Results
Data Guard synchronous transport is viable for LAN and even for
MAN (~450 km / 10 ms RTT)
– Zero data loss capability
– Minimal impact on primary system throughput (less than 3% in tests)
Asynchronous transport is viable for all types of networks
– US coast-coast deployment (~4000 km / 80 ms RTT) has almost no
performance impact (less than 1% in tests) with an average transaction loss
potential of 1 second in the event of a disaster
Using SSH compression over a WAN in the asynchronous mode
reduces the network traffic by 35-60%
Switchover can be done in 1 minute, failover can be done as fast as
15 seconds
Data Guard and Streams
Streams and Data Guard are independent features of Oracle Database
Enterprise Edition, based on some common underlying technology
Data Guard: Disaster Recovery & Data Protection
– Transactionally consistent standby databases
– Zero data loss
– Automated switchover/failover
– Various data protection modes
Streams: Information Sharing/Distribution
– Fine granularity and control over what is replicated
– Bi-directional replication
– Data transformations
– Heterogeneous platforms
Financial Services Company Using Data Guard & Streams
Streams
Master for information
Database distribution
Data Feed
Data Guard Data Transformation
for DR
Product Delivery Databases
for Client Access
Physical Standby Database
Disaster Recovery with Remote Mirroring
Remote Mirroring (host-based and storage-based) is
another popular way to protect enterprise data
Pro’s
– 1 solution for all datatypes
Con’s
– Bandwidth (up to 30x)
– No protection from human failure (DML/DD)
– Cost of hard- and software
Data Guard Advantages
1. Network Efficiency 4. Functionality
– Transmits only redo data – Comprehensive DR solution
2. Better suited for WANs 5. Flexibility
– No protocol converters, – No vendor lock-in for underlying
based on standard TCP/IP storage
3. Better Data Protection 6. ROI
– Preserves write-order – Extract value out of DR
consistency, avoids logical investment, integrated natively
and physical corruptions with the database
Agenda
HA / DR Challenges
Data Guard Architecture & Features
Data Guard 10g New Features
Maximum Availability Architecture
Summary
Oracle Data Guard Benefits
1. Disaster Recovery & High Availability
– Easy failover/switchover between primary and standby databases
2. Complete data protection
– Enables zero data loss, safeguard against data corruptions, human errors
3. Efficient utilization of system resources
– Standby databases can be used for reporting, backups, queries
4. Balance data availability against performance
– Flexible data protection/synchronization modes
5. Automatic resynchronization after restoration of network connectivity
– Automatic archive gap detection and resolution with no manual intervention
6. Centralized and simple management
– Push-button graphical interface for management and monitoring
Resources
Maximum Availability Architecture white papers:
http://otn.oracle.com/deploy/availability/htdocs/maa.htm
HA Portal on OTN: http://otn.oracle.com/deploy/availability/
Data Guard home page on OTN:
http://otn.oracle.com/deploy/availability/htdocs/DataGuardOverview.html
Oracle Documentation – Data Guard:
http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10823/toc.htm
Oracle Documentation – High Availability Best Practices:
http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10726/toc.htm
Upcoming events
Miracle Database Forum - October 28-30 - www.miracleas.dk
– Data Guard 10g new features
– Performance Issues of Data Guard Configurations
UKOUG annual conference - November 1-3 - www.ukoug.co.uk
– Fast Worldwide Consolidation of large databases
– Performance Issues of Data Guard Configurations
QUESTIONS
ANSWERS