|
 |
|
archived redo log gap tips
Oracle Database Tips by Donald BurlesonDecember 3, 2015
|
Data Guard
Archive Redo Gap Sequence
problems
An Archive Gap Sequence is a set of archived
redo logs that could not be transmitted to the standby site. As a
result of an archive gap, the RAC cluster will lag behind the
primary database. Usually, an archive gap sequence is created as the
result of a network outage and the connection between the primary
and the standby site is lost. The archive gap sequence can also
occur during the creation of a standby database.
In Oracle 9i r2, Oracle significantly improved
Data Guard automatic archive gap detection and
resolution which reduces the chances of lag between the primary and
the standby site.
Detection and Resolution of Data Guard archived
redo log gaps
Starting with Release 2 of Oracle 9i, three
methods of Data Guard automatic archive gap detection became available. The
following is a description of their features:
-
The archiver process of the primary database
polls the standby databases every 60 seconds. This is referred to as
"heartbeat." During heartbeat, if an Oracle instance reports an
archive gap, the archiver of the primary database sends the archived
redo log files required to fill the gap. Once the files have been
transferred, the Data Guard site is marked as up to date.
-
Archived redo logs are transferred from the
Data Guard primary database to the Data Guard standby database. On the primary database
side, the LGWR or ARCH is responsible for sending the archived redo
logs. On the standby site, the RFS process takes the archived redo
log file and writes to the host machine. An archived redo log file
is uniquely identified by its sequence number and thread number.
-
When the RFS process receives an archived redo log file, it
compares the sequence number with the sequence number of the
previously received archived redo log file. If the sequence
number of the current archived redo log file is greater than the
sequence number of the last received archived redo log file plus
one, a request is sent to the archiver process of the Data Guard
primary database that is providing a list of missing archived
redo log files. The archiver of the primary database then
retransmits these archived redo log files, thereby resolving the
redo log gap sequence.
-
For a Data Guard physical standby database, Oracle 9i Release
2 introduced a request-response system for gap resolution
through the FAL background process. The FAL method of gap
resolution is initiated by the Managed Recovery Process (MRP).
If the MRP detects a gap in archived redo logs during the
application of log files, it requests the archiver process of
the primary database to resend the archived redo log files which
have caused the gap sequence.
- There are two important parameters required for redo log gap
sequence resolution through the FAL background process and the
Data Guard parameters: fal_server and
fal_client. These two parameters need to be set in the
initialization parameter file of the physical standby database.
fal_server is the service name of the primary database
and fal_client is the service name of the standby
database.
- The fal_client Data Guard parameter should be one
of the remote archival destinations of the primary database
pointing to this standby database. When MRP detects a gap
sequence, it requests the archiver process of the primary
database, identified by the fal_server parameter, and passes the
sequence number of log files causing the archive gap. In
addition, it passes the service name defined by the fal_client
parameter to the archiver of the primary database. The archiver
process of the primary database then retransmits the archived
log files requested by the MRP of the standby database.
|