Datagaurd
Datagaurd
Datagaurd
17 Votes
Oracle Data Guard is one of the most effective and comprehensive data availability,
data protection and disaster recovery solutions available today for enterprise
data.
Available as a feature of the Enterprise Edition of the Oracle Database, Data Guard
can be used in combination with other Oracle High Availability (HA) solutions such
as Real Application Clusters (RAC), Oracle Flashback and Oracle Recovery Manager
(RMAN), to provide a very high level of data protection and data availability that
is unprecedented in the industry.
A Data Guard configuration consists of one production (or primary) database and up
to nine standby databases. The databases in a Data Guard configuration are
connected by Oracle Net and may be dispersed geographically. There are no
restrictions on where the databases are located, provided that they can communicate
with each other. However, for disaster recovery, it is recommended that the standby
databases are hosted at sites that are geographically separated from the primary
site.
A standby database is initially created from a backup copy of the primary database.
Once created, Data Guard automatically maintains the standby database as a
transactional consistent copy of the primary database by transmitting primary
database redo data to the standby system and then applying the redo logs to the
standby database.
Data Guard provides two methods to apply this redo data to the standby database and
keep it transactional consistent with the primary, and these methods correspond to
the two types of standby databases supported by Data Guard.
A logical standby database contains the same logical information as the production
database, although the physical organization and structure of the data can be
different. The SQL apply technology keeps the logical standby database synchronized
with the primary database by transforming the data in the redo logs received from
the primary database into SQL statements and then executing the SQL statements on
the standby database. This makes it possible for the logical standby database to be
accessed for queries and reporting purposes at the same time the SQL is being
applied to it. Thus, a logical standby database can be used concurrently for data
protection and reporting.
Role Management:
Using Data Guard, the role of a database can be switched from a primary role to a
standby role and vice versa, ensuring no data loss in the process, and minimizing
downtime. There are two kinds of role transitions – a switchover and a failover. A
switchover is a role reversal between the primary database and one of its standby
databases. This is typically done for planned maintenance of the primary system.
During a switchover, the primary database transitions to a standby role and the
standby database transitions to the primary role. The transition occurs without
having to re-create either database. A failover is an irreversible transition of a
standby database to the primary role. This is only done in the event of a
catastrophic failure of the primary database, which is assumed to be lost and to be
used again in the Data Guard configuration, it must be re-instantiated as a standby
from the new primary.
In some situations, a business cannot afford to lose data at any cost. In other
situations, some applications require maximum database performance and can tolerate
a potential loss of data. Data Guard provides three distinct modes of data
protection to satisfy these varied requirements:
Maximum Protection— This mode offers the highest level of data protection. Data is
synchronously transmitted to the standby database from the primary database and
transactions are not committed on the primary database unless the redo data is
available on at least one standby database configured in this mode. If the last
standby database configured in this mode becomes unavailable, processing stops on
the primary database. This mode ensures no-data-loss.
Maximum Availability— This mode is similar to the maximum protection mode,
including zero data loss. However, if a standby database becomes unavailable (for
example, because of network connectivity problems), processing continues on the
primary database. When the fault is corrected, the standby database is
automatically resynchronized with the primary database.
Maximum Performance— This mode offers slightly less data protection on the primary
database, but higher performance than maximum availability mode. In this mode, as
the primary database processes transactions, redo data is asynchronously shipped to
the standby database. The commit operation of the primary database does not wait
for the standby database to acknowledge receipt of redo data before completing
write operations on the primary database. If any standby destination becomes
unavailable, processing continues on the primary database and there is little
effect on primary database performance.
The Oracle Data Guard Broker is a distributed management framework that automates
and centralizes the creation, maintenance, and monitoring of Data Guard
configurations. All management operations can be performed either through Oracle
Enterprise Manager, which uses the Broker, or through the Broker’s specialized
command-line interface (DGMGRL).
The following diagram shows an overview of the Oracle Data Guard architecture.
This section will highlight some of the key new features of Oracle Data Guard 10g
Release 2. For details into these features, please refer to the following:
Fast-Start Failover
This capability allows Data Guard to automatically, and quickly fail over to a
previously chosen, synchronized standby database in the event of loss of the
primary database, without requiring any manual steps to invoke the failover, and
without incurring any data loss. Following a fast-start failover, once the old
primary database is repaired, Data Guard automatically reinstates it to be a
standby database. This act restores high availability to the Data Guard
configuration.
Several enhancements have been made in the redo transmission architecture to make
sure redo data generated on the primary database can be transmitted as quickly and
efficiently as possible to the standby database(s).
Archived logs, once they are applied on the logical standby database, are
automatically deleted, reducing storage consumption on the logical standby and
improving Data Guard manageability. Physical standby databases have already had
this functionality since Oracle Database 10g Release 1, with Flash Recovery Area.
This section will highlight some of the key new features of Oracle Data Guard 10g
Release 1. For details into these features, please refer to the following:
With this feature, redo data can be applied on the standby database (whether Redo
Apply or SQL Apply) as soon as they have written to a Standby Redo Log (SRL). Prior
releases of Data Guard require this redo data to be archived at the standby
database in the form of archivelogs before they can be applied.
The Real Time Apply feature allows standby databases to be closely synchronized
with the primary database, enabling up-to-date and real-time reporting (especially
for Data Guard SQL Apply). This also enables faster switchover and failover times,
which in turn reduces planned and unplanned downtime for the business.
Data Guard in 10g has been integrated with the Flashback family of features to
bring the Flashback feature benefits to a Data Guard configuration.
Logical standby database can now be created from an online backup of the primary
database, without shutting down or quiescing the primary database, as was the case
in prior releases. No shutdown of the primary system implies production downtime is
eliminated, and no quiesce implies no waiting for quiescing to take effect and no
dependence on Resource Manager.
Rolling Upgrades:
Oracle Database 10g supports database software upgrades (from Oracle Database 10g
Patchset 1 onwards) in a rolling fashion, with near zero database downtime, by
using Data Guard SQL Apply. The steps involve upgrading the logical standby
database to the next release, running in a mixed mode to test and validate the
upgrade, doing a role reversal by switching over to the upgraded database, and then
finally upgrading the old primary database. While running in a mixed mode for
testing purpose, the upgrade can be aborted and the software downgraded, without
data loss. For additional data protection during these steps, a second standby
database may be used.
By supporting rolling upgrades with minimal downtimes, Data Guard reduces the large
maintenance windows typical of many administrative tasks, and enables the 24×7
operation of the business.
Additional Datatypes:
NCLOB
LONG
LONG RAW
BINARY_FLOAT
BINARY_DOUBLE
IOT-s (without overflows and without LOB columns)
This support for additional datatypes allows logical standby databases to recover
and protect a wider variety of data, thus increasing the overall database
protection and recovery options for Data Guard.
It is now possible to use the Data Guard Broker, and the Broker’s Command Line
Interface (DGMGRL), as well as Enterprise Manager, to create and manage Data Guard
configurations that contain RAC primary and RAC standby databases. In Oracle9i,
such administration is possible only through SQL*Plus. In Data Guard 10g, Data
Guard Broker interfaces with Oracle Clusterware such that it has control over
critical operations during specific Data Guard state transitions, such as
switchovers, failovers, protection mode changes and state changes.
Ease of use.
Management based on best practices.
Pre-built integration with other HA features.