- The document discusses Oracle Data Guard, which is Oracle's disaster recovery solution that automates the creation and maintenance of transactionally consistent standby copies of a primary database.
- Data Guard helps protect data by taking the primary database data and automatically replicating it to one or more standby databases. This allows for failover to a standby if the primary fails.
- There are three types of standby databases: physical standby databases which are block-for-block identical copies, and logical standby databases which transform redo logs into SQL for application.
- Data Guard provides switchover and failover capabilities for planned and unplanned outages, respectively, to transition the primary role to a standby without
3. Introduction:
Business continuity and disaster recovery are top
priorities for the senior management of most
global enterprise. Economic fluctuations, rapid
changes in market trends, and competitive
pressures imply that the global enterprise of
today must operate in a 24x7 environment, and
must be able to swiftly and efficiently deal with
unforeseen business interruptions.
4. So, just what is Data Guard?
Oracle’s disaster recovery solution for Oracle data
Feature of Oracle Database Enterprise Edition
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
“An application-transparent high-performance low-impact asymmetrical online reliable
Redo or SQL level background standby database transaction exchange utility capable of
reporting, switchover and Failover.”
What?
5. Simply put…
Data Guard helps you protect your Data.
Takes your data and automatically puts it elsewhere
Makes it available for Failover in case of failure.
The other capabilities are pure bonus.
Switchover for Maintenance
Reporting
Off-loading Queries
Backups
6. Oracle Data Guard Focus
Data Failures & Site Disasters:
– Data Protection
– Data Availability
– Data Recovery
Data is the core asset of
the enterprise!All 3 are important!
• Also addresses human errors & planned maintenances
8. What data guard can be used for?
System, hardware and cluster upgardes
Migration to ASM ,RAC
same platforms(windows/ Linux and some mixed DG support)
Patchset or database upgrade
Testing for development , upgrades
9. Why Data Guard?
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
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
12. Types Of Data Guard
1. Primary
Database
2. Standby
Databases
The 2 types of standby
databases
Physical
standby
database
Logical
standby
database
13. Primary Database
A Data Guard configuration contains one production
database, also referred to as the primary database,
that functions in the primary role. This is the database
that is accessed by most of your applications.
The primary database can be either a single-instance
Oracle database or an Oracle Real Application Clusters
database.
14. Standby Database
A standby database is a transactionally consistent copy of the
primary database.
Maintained automatically using redo data.
Similar to a primary database, a standby database can be either a
single-instance Oracle database or an Oracle Real Application
Clusters database.
15. The three types of standby databases
Physical standby database
Block-for-block identical with the primary
database.
Synchronized with the primary database by
application of redo data
Not open while redo is being applied.
Can be opened temporarily for read-only.
From 11g, can be left open read-only for
reporting .
MUST NOT be opened read-write!.
16. Logical standby database:
Shares the same schema definition.
Synchronized with the primary database by
transforming redo into SQL statements.
Database is open while redo-SQL is being applied.
May contain additional indexes and materialized
views to support reporting.
Does NOT support all data types (eg. rowid,
nested table, varray, object type REF, XML type).
17. Data Guard Services
Log apply services:
Redo Apply (Physical Standby)
Recovers the redo data received from the primary database
and applies the redo to the physical standby database.
SQL Apply (Logical Standby)
Transforms the data in the redo received from the primary
database into SQL statements and then executes the SQL
statements on the standby database.
18. Redo Transport Services:
Control the automated transfer of redo data
from the production database to one or more
archival destinations.
Configurable using ARCH or LGWR
Used by Data Guard and Streams
Role Transitions:
Change the role of a database from a standby database
to a primary database, or from a primary database to a
standby database using either a switchover or a failover
operation.
19. Switchover & Failover
Oracle Data Guard offers two easy-to-use methods to handle
planned and unplanned outages of the production site. These
methods are called switchover and failover.
1. Switchover:
A switchover is typically used to reduce primary database
downtime during planned outages, such as operating system or
hardware upgrades, or rolling upgrades of the Oracle database
software and patch sets.
A switchover guarantees no data loss .
20. During a switchover, the primary database transitions to a
standby role, and the standby database transitions to the
primary role.
After a switchover, each database continues to participate
in the Data Guard configuration with its new role.
22. 2. Failover:
A failover is typically used only when the
primary database becomes unavailable,
and there is no possibility of restoring it to
service within a reasonable period of time.
A failover is done when the primary
database fails or has become unreachable
and one of the standby databases is
transitioned to take over the primary role.
23. Unplanned failover to standby database
Original standby becomes new primary
Original primary may need to be rebuilt
Possible data loss
In short……
25. Protection modes
Data Guard protection modes are simply a set of rules.
A protection mode is only set on the primary database.
And also defines the way Oracle Data Guard will maximize a Data
Guard configuration for performance, availability, or protection in
order to achieve the maximum amount of allowed data loss that
can occur when the primary database or site fails.
Each of the three modes provide a high degree of data protection
26. A Data Guard configuration will always run in one of
the three protection modes listed below:
1. Maximum Protection
2.Maximum Availability
3.Maximum performance
27. Protection
Mode
Risk of Data Loss In the Event
of a Disaster
Redo Transport
Mechanism
Maximum
Protection
Maximum
Availability
Maximum
Performance
Zero data loss; Double failure
protection
Zero data loss; Single failure
protection
Minimal data loss – usually 0
to few seconds
LGWR SYNC
LGWR SYNC
LGWR ASYNC or ARCH
28. 1. Maximum Protection
Zero Data Loss!
Highest Level of Protection
Configuration: LGWR SYNC, SRLs
Enforces protection of every transaction
If last standby is unavailable, processing stops at primary
Good for financial systems where no data loss is acceptable
Primary database changes are not committed until it has been
confirmed that the data is available on at least one standby
database.
If Oracle determines that the redo data cannot be transferred
from the primary server to the standby server, it will
automatically stop the primary database instance.
29. 2.Maximum Availability
Zero Data Loss as long as the network stays up!
Enforces protection of every transaction
Configuration: LGWR SYNC, do not need SRLs
If last standby is unavailable, processing continues at primary
When the standby becomes available again, synchronization with
the primary is automatic
Primary database tolerates one transmission failure.
minimal data loss,Similar to maximum protection mode.
If the standby database becomes unavailable for any reason, the
protection mode is temporarily lowered to maximum performance
until the problem has been corrected.
30. Like maximum protection mode, a transaction will not commit until
the redo needed to recover that transaction is written to the local
online redo log and to at least one remote standby redo log.
Unlike maximum protection mode, the primary database does not
shut down if a fault prevents it from writing its redo stream to a
remote standby redo log.
Instead , the primary database operates in maximum performance
mode until the fault is corrected and all gaps in redo log files are
resolved. When all gaps are resolved, the primary database
automatically resumes operating in maximum availability mode.
31. 3.Maximum performance
Highest level of performance
Configuration: LGWR ASYNC, or ARCH
Protects from failure of any single component
Least impact on production system
Useful for applications that can tolerate some data loss
This is the default mode, we get the highest performance but the lowest protection.
If all of the standby servers become unavailable, processing will continue on the
primary database.
PRIMARY DATABASE ships directly from the primary log buffer to STANDBY
DATABASE.
PRIMARY DATABASE's performance is at maximum, but there is no guarantee that a
small amount of data loss.
Data loss depend on how well our network can handle the amount of redo and also
redo rate.
32. Active data guard
Active Data Guard is 100% compatible with Data Guard functionality included
with Oracle Database 11g Enterprise Edition.
Active Data Guard 11g Release 2 enables the automatic repair of corrupt blocks
transparent to the user and application.
Block-level data loss usually results from intermittent, random I/O errors, as well
as memory corruptions that get written to disk. However, if the corruption occurs
on a primary database that has an Active Data Guard standby, block media
recovery is performed automatically, transparent to the application, using a good
copy of the block from the standby database.
Conversely, bad blocks on the standby database are automatically repaird using
the good version from the primary database.
33. Functionality of active data guard
Real-Time Query - offload read-only workloads to
an up-to-date standby database
Automatic Block Repair - automatic repair of
physical corruption transparent to the user
Far Sync - zero data loss protection across any
distance
Standby Block Change Tracking - enable
incremental backups on an active standby
Active Data Guard Rolling Upgrade - make it
simple to reduce planned downtime
Global Database Services - load balancing and
service management across replicated databases.
Application Continuity - make outages
transparent to users.
34. Separately licensed option
Updates applied to primary
Changes can be read immediately on standby databases
Standby database can be opened in read-only mode
Redo can continue to be applied
35.
36. Data guard broker
The Data Guard broker is a distributed management framework
that automates the creation, maintenance, and monitoring of
Data Guard configurations.
Introduced in Oracle 9.2
Stable in Oracle 10.2 and above
Managed using DGMGRL utility
Contains Data Guard configuration
Used by Enterprise Manager to manage standby
Mandatory for some new functionality e.g.Fast Start Failover.
37. You can use either the Oracle Enterprise Manager
graphical user interface (GUI) or the Data Guard
command-line interface (DGMGRL) .
Manage and monitor Data Guard configurations
that contain Real Application Clusters primary or
standby databases.
38. Fast start failover
Oracle introduced the Fast-Start Failover (FSF) feature set
in Release 10gR2.
Failover is a one way process where your primary
database goes down due to some reasons and to get back
the production live without any data loss, you convert
your existing Physical
Standby database to start behaving as Primary database.
it has been installed on a separate server, the FSFO can
only be managed via the DGMGRL utility.
39. The Dataguard Broker Observer is used when fast start failover is
required. Fast start failover is simply an automatic failover to the
standby database.
The Observer is a component of the DGMGRL interface, which
monitors the availability of the primary database.
FSFO uses Flashback Database as part of the process of reinstating a
failed primary as a standby. It provides a way to quickly restore a
database to a previous point in time or SCN.
40. Dis advantage of data guard
Same release of Oracle Database Enterprise Edition must be
installed on the primary database and all standby database in
a Data Guard configuration.
Data Guard is not an extra cost option, but you do have to pay
for a full oracle license at the standby node.
For standby database you need another oracle server, which
adds extra costs in company’s investment.