Professional Documents
Culture Documents
2
What is a Disaster?
3
What is Data Guard?
• Data Availability & Data Protection solution for Oracle
• Automates the creation and maintenance of one or more
synchronized copies (standby) of the production (or
primary) database
• If the primary database becomes unavailable, a standby
database can easily assume the primary role
• Standby databases also used for queries, reporting,
testing, or backups while in standby role
• An included feature of Oracle Database Enterprise Edition
4
Oracle’s Integrated HA Solution Set
System
Real Application Clusters
5
Oracle Data Guard Architecture
Dallas Physical Open R/O
Standby
Sync or Async
Redo Shipping
Production Redo
Database Apply
Network
Backup
Broker
DIGITAL DATA STORAGE
SQL
Apply
Boston
6
Data Guard Process Architecture
Redo Transport & Apply
Transactions Physical/Logical
Oracle Net
Standby Database
MRP - physical
LGWR LNS RFS LSP - logical
sync
Standby
async Redo
Online Transform Redo
Logs to SQL for
Primary Redo Logs arch
Logical Standby
Database
ARCH Queries,
Reports,
ARCH Testing,
Backups
Archived
Archived Redo Logs
Redo Logs
7
Data Guard Redo Apply
Open
Read-Only
Redo Apply
Network
Backup
Redo Shipment
Standby DIGITAL DATA STORAGE
Redo Logs
8
Data Guard SQL Apply
Additional
Indexes &
Materialized Views
Network Open
Read - Write
9
SQL Apply Process Architecture
Redo
LCR
Redo Data Records
LCR
from Reader Preparer : Builder
Primary
Database Shared
Pool
Log Mining
Transaction
groups
Apply Processing
Logical
Standby Applier Coordinator Analyzer
Database
Transactions Transactions sorted
to be applied in dependency order
10
Redo Apply or SQL Apply?
Redo Apply SQL Apply
• Physical, block-for-block copy • Logical, transaction-for-
of the primary transaction copy of the primary
• Can be open for read-only • Allows creation of additional
queries – supports real-time objects, modification of objects
reporting in 11g • Able to skip apply on certain
• At role transition, offers objects
assurance that the standby • Is open read-write (data in
database is an exact replica of tables maintained by SQL
the old primary Apply can not be changed)
• Can be used for fast backups • Supports real-time reporting
• Higher performance • Has datatype restrictions
11
Protection from Human Errors
Flashback Database or Delayed Apply
Data Changes
12
Switchover and Failover
• Switchover
• Planned role reversal
• No database reinstantiation required
• Used for maintenance of OS or hardware
• Failover
• Unplanned failure of primary
• Use Flashback Database to reinstante original primary
13
Fast-Start Failover
Standby Site
Primary Site Primary
StandbySite
Site
Observer
Steady state - Data Guard Observer Process monitors the state of the configuration
Disaster strikes and an automatic failover is executed
When repaired - the Observer reinstates the original primary as a new standby
14
Data Guard 11g Enhancements
Increase ROI High Availability
• Active Data Guard • Faster Redo Apply
• Real-time Query • Faster failover & switchover
• Fast Incremental backup • Fast-Start Failover using ASYNC
• Snapshot Standby • Transient Logical Standby
15
Traditional Physical Standby Databases
Investment in Disaster Recovery only
Real-time
Queries
Production Standby
Database Database
16
Active Data Guard 11g
Real-time Query
Real-time
Real-time
Query
Queries
Continuous Redo
Shipment and Apply
17
Active Data Guard Benefits
Invest in improving Quality of Service
18
Active Data Guard - Licensing
19
How to Setup a Standby Database
10g 11g
1. Prepare the primary database. 1. Prepare the primary database.
2. Back up the primary database. 2. Configure Oracle Net Services.
3. Copy files to the standby 3. Prepare the standby database.
system. 4. Duplicate database over
4. Set parameters on the physical network.
standby database. 5. Start the standby database.
5. Start the standby database. 6. Use DataGuard to set
6. Configure Oracle Net Services. parameters for transport and
7. Set parameters on the primary appy services.
database.
8. Start the transport of redo.
20
Prepare Primary Database
21
Configure Oracle Net Services
22
Prepare the Standby Database
23
Duplicate the Primary Database Over
the Network
• Startup standby instance
• sql> startup nomount
• Duplicate using RMAN
connect target sys/…@porcl
connect auxiliary sys/…@sorcl
24
Setup Dataguard Broker
DGMGRL> connect …
DGMGRL> create configuration …
DGMGRL> enable configuration;
DGMGRL> add database …
DGMGRL> enable database …
25
Configure Dataguard Attributes
26
Use the Standby Database – Active
Dataguard
• Disable redo apply
dgmgrl> edit database ‘SORC’ set state = ‘apply-off’;
27
Enterprise Manager Grid Control
28