Concept
of Data Guard:
Oracle Data Guard ensures
high availability, data protection, and disaster recovery for enterprise data.
Data Guard provides a comprehensive set of services that create, maintain,
manage, and monitor one or more standby databases to enable production Oracle databases to
survive disasters and data corruptions. Data Guard maintains these standby
databases as copies of the production database. Then, if the production database
becomes unavailable because of a planned or an unplanned outage, Data Guard can
switch any standby database to the production role, minimizing the downtime
associated with the outage. Data Guard can be used with traditional backup,
restoration, and cluster techniques to provide a high level of data protection
and data availability.
Data Guard Configurations:
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. There are no restrictions on where the databases are
located, provided they can communicate with each other. For example, you
can have a standby database on the same system as the production database,
along with two standby databases on other systems at remote locations.
You
can manage primary and standby databases using the SQL command-line interfaces
or the Data Guard broker interfaces, including a command-line interface
(DGMGRL) and a graphical user interface that is integrated in Oracle Enterprise
Manager.
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 (Oracle RAC) database.
Standby
Databases:
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 thirty 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.
Similar
to a primary database, a standby database can be either a single-instance
Oracle database or an Oracle RAC database.
Types of standby databases:
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. The database schema, including indexes, are the same. A physical
standby database is kept synchronized with the primary database, through
Redo Apply, which recovers the redo data received from the primary
database and applies the redo to the physical standby database.
As of Oracle Database 11g release
1 (11.1), a physical standby database can receive and apply redo while it is
open for read-only access. A physical standby database can therefore be used
concurrently for data protection and reporting.
- 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 through SQL Apply, which transforms the data in the
redo received from the primary database into SQL statements and then
executes the SQL statements on the standby database.
A logical standby database can be
used for other business purposes in addition to disaster recovery requirements.
This allows users to access a logical standby database for queries
and reporting purposes at any time. Also, using a logical standby
database, you can upgrade Oracle Database software and patch sets with almost
no downtime. Thus, a logical standby database can be used concurrently for data
protection, reporting, and database upgrades.
- Snapshot
Standby Database
A snapshot standby database is a
fully updatable standby database.
Like a physical or logical standby
database, a snapshot standby database receives and archives redo data from a
primary database. Unlike a physical or logical standby database, a snapshot
standby database does not apply the redo data that it receives. The redo data
received by a snapshot standby database is not applied until the snapshot
standby is converted back into a physical standby database, after first
discarding any local updates made to the snapshot standby database.
A snapshot standby database is best
used in scenarios that require a temporary, updatable snapshot of a physical
standby database. Note that because redo data received by a snapshot standby
database is not applied until it is converted back into a physical standby, the
time needed to recover from a primary database failure is directly proportional
to the amount of redo data that needs to be applied.
Data Guard Services
Redo Transport Services: Redo
transport services control the automated
transfer of redo data from the production database to one or more archival
destinations.Redo transport services perform the following tasks
.Transmit redo data from the primary
system to the standby systems in the configuration
·
Manage the process of resolving any
gaps in the archived redo log files due to a network failure
·
Automatically detect missing or
corrupted archived redo log files on a standby system and automatically
retrieve replacement archived redo log files from the primary database or
another standby database.
Apply Services: he redo data transmitted from
the primary database is written to the standby redo log on the standby
database. Apply
services automatically apply the redo
data on the standby database to maintain consistency with the primary database.
It also allows read-only access to the data.
The
main difference between physical and logical standby databases is the
manner in which apply services apply the archived redo data:
·
For physical standby databases, Data
Guard uses Redo Apply technology,
which applies redo data on the standby database using standard recovery
techniques of an Oracle database.
·
For logical standby databases, Data Guard uses SQL Apply technology, which first transforms the received redo
data into SQL statements and
then executes the generated SQL statements on the logical standby database
Role
Transitions:
An
Oracle database operates in one of two roles: primary or standby. Using Data
Guard, you can change the role of a 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. 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.
A failover is
when the primary database is unavailable. Failover is performed only in the
event of a failure of the primary database, and the failover results in
a transition of a standby database to the primary role. The database
administrator can configure Data Guard to ensure no data loss.
The
role transitions described in this documentation are invoked manually using SQL
statements. You can also use the Oracle Data Guard broker to simplify role
transitions and automate failovers using Oracle Enterprise Manager or the
DGMGRL command-line interface
Data Guard Protection Modes
In
some situations, a business cannot afford to lose data regardless of the
circumstances. In other situations, the availability of the database may be more
important than any potential data loss in the unlikely event of a multiple
failure. Finally, some applications require maximum database performance at all
times, and can therefore tolerate a small amount of data loss if any component
should fail. The following descriptions summarize the three distinct modes of
data protection.
- Maximum availability This protection mode provides the highest level of data
protection that is possible without compromising the availability of a primary
database. Transactions do not commit until all redo data needed to recover
those transactions has been written to the online redo log and to the standby
redo log on at least one synchronized standby database. If the primary database
cannot write its redo stream to at least one synchronized standby database, it
operates as if it were in maximum performance mode to preserve primary database
availability until it is again able to write its redo stream to a synchronized
standby database.
This
protection mode ensures zero data loss except in the case of certain double
faults, such as failure of a primary database after failure of the standby
database.
- Maximum performance This is the default protection mode. It provides the highest
level of data protection that is possible without affecting the performance of
a primary database. This is accomplished by allowing transactions to commit as
soon as all redo data generated by those transactions has been written to the
online log. Redo data is also written to one or more standby databases, but
this is done asynchronously with respect to transaction commitment, so primary
database performance is unaffected by delays in writing redo data to the
standby database(s).
This
protection mode offers slightly less data protection than maximum availability
mode and has minimal impact on primary database performance.
- 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 a transaction must be written to both the online redo log and
to the standby redo log on at least one synchronized standby database before
the transaction commits. To ensure that data loss cannot occur, the primary
database will shut down, rather than continue processing transactions, if it
cannot write its redo stream to at least one synchronized standby database.
Active Data Guard:
Active
Data Guard is an option license for Oracle Database Enterprise Edition. Active
Data Guard enables advanced capabilities that that extend basic Data Guard
functionality. These include:
·
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.
************Please
go for next section for step by step standby database configuration*********
I read this article, it is really informative one. Your way of writing and making things clear is very impressive. Thanking you for such an informative article. Executive Protection Service Agency In Thailand
ReplyDelete