Data Guard
An
application-transparent high performance low impact online Redo or SQL level
background standby database transaction exchange utility capable of reporting,
switchover and Failover. Data Guard is a disaster recovery solution for Oracle
database. It protects Oracle database against primary site failures, disasters,
errors and data corruption. Data Guard can switch any standby database to the
production role, minimizing the downtime associated with the outage.
#
It helps to take the data and automatically puts it somewhere.
#
It makes available for Failover in case of failure.
#
It also enable switchover for maintenance
#
Helps in reporting
#
Backups
Data Guard
Configuration
A
Data Guard configuration consists of one production database and one or more
standby databases. The databases in a Data Guard configuration are connected by
Oracle Net and may be dispersed geographically.
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.
Standby Database- A standby database
is a transactionally consistent copy of the primary database. Using a backup
copy of the primary database, you can create up to nine standby databases
and incorporate them in a Data Guard
configuration. Once created, Data Guard automatically maintains each standby
database by transmitting redo data from the primary database and then applying
the redo to the standby database.
Physical standby
database-
Provides a physically identical copy of the primary database, with on disk database
structures that are identical to the primary database on a block-for-block
basis. A physical standby database is kept synchronized with the primary
database, though Redo Apply which
recovers the redo data received from the primary database and applies the redo
to the physical standby database
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 logical
standby database is kept synchronized with the primary database though SQL
Apply, which transforms the data in the redo received from the primary database
into SQL statements and then executing the SQL statements on the standby
database.
Data Guard Services
There
are three types of Data Guard Services as follows:
Redo Transport
Services-Control
the automated transfer of redo data from the production database to one or more
archival destinations.
Log Apply Services-Apply redo data on
the standby database to maintain transactional synchronization with the primary
database. Redo data can be applied either from archived redo log files, or, if
real-time apply is enabled, directly from the standby redo log files as they
are being filled, without requiring the redo data to be archived first at the
standby database.
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.
A
switchover is a role reversal
between the primary database and one of its standby databases. A switchover
ensures no data loss.
A
failover is when the primary
database is unavailable. Failover is performed only in the event of a
catastrophic failure of the primary database, and the failover results in a
transition of a standby database to the primary role.
Data Guard Broker
The
Data Guard broker is a distributed management framework that automates the
creation, maintenance, and monitoring of Data Guard configurations.
Manager
graphical user interface (GUI) or the Data Guard command-line interface
(DGMGRL) are used for the configuration of Data Guard.
Data Guard
Protection Modes
There
are three types of Data Guard Protection Modes-
Maximum protection-This protection mode
ensures that no data loss will occur if the primary database fails. To provide
this level of protection, the redo data needed to recover each transaction must
be written to both the local online redo log and to the standby redo log on at
least one standby database before the transaction commits. To ensure data loss
cannot occur, the primary database shuts down if a fault prevents it from
writing its redo stream to the standby redo log of at least one transactionally
consistent standby database.
Maximum availability-This protection mode
provides the highest level of data protection that is possible without
compromising the availability of the primary database. 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 the standby redo log
of at least one transactionally consistent standby database. 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.
Maximum performance- This protection
mode (the default) provides the highest level of data protection that is
possible without affecting the performance of the primary database. This is
accomplished by allowing a transaction to commit as soon as the redo data
needed to recover that transaction is written to the local online redo log. The
primary database’s redo data stream is also written to at least one standby
database, but that redo stream is written asynchronously with respect to the
transactions that create the redo data.
Data Guard Benefits-
Disaster recovery,
data protection, and high availability
Data
Guard provides an efficient and comprehensive disaster recovery and high
availability solution. Easy-to-manage switchover and failover capabilities
allow role reversals between primary and standby databases, minimizing the
downtime of the primary database for planned and unplanned outages.
Complete data protection
Data
Guard can ensure no data loss, even in the face of unforeseen disasters. A standby
database provides a safeguard against data corruption and user errors. Storage
level physical corruptions on the primary database do not propagate to the
standby database. Similarly, logical corruptions or user errors that cause the
primary database to be permanently damaged can be resolved. Finally, the redo
data
is validated when it is applied to the standby database.
Efficient use of
system resources
The
standby database tables that are updated with redo data received from the
primary database can be used for other tasks such as backups, reporting,
summations, and queries, thereby reducing the primary database workload
necessary to perform these tasks, saving valuable CPU and I/O cycles.
A
logical standby database can remain open while the tables are updated from the
primary database,
and
the tables are simultaneously available for read-only access.
Automatic gap
detection and resolution
If
connectivity is lost between the primary and one or more standby databases (for
example, due to network problems), redo data being generated on the primary
database cannot be sent to those standby databases. Once a connection is
reestablished, the missing archived redo log files (referred to as a gap) are
automatically detected by Data Guard, which then automatically transmits the
missing archived redo log files to the standby databases. The standby databases
are synchronized with the primary database, without manual intervention by the
DBA.
Automatic role
transitions
When
fast-start failover is enabled, the Data Guard broker automatically fails over to
a synchronized standby site in the event of a disaster at the primary site,
requiring no intervention by the DBA. In addition, applications are
automatically notified of the role transition.