 |
|
Data Guard Real Time Apply Tips
Oracle Database Tips by Donald BurlesonDecember 9, 2015
|
Oracle Data Guard
Real Time Apply
Data Guard Log Apply Services can automatically
apply information from redo logs to standby databases, keeping data
synchronized with the primary database. In general, log apply
services wait for the full archived redo log to arrive to the
Oracle instance
host before applying to the standby database.
Redo data is received by the remote file server
process (RFS) on the standby system, where the RFS process writes
the redo data to either archived redo logs or optionally to a
standby redo log.
However, if a standby redo log is used, real time
apply can be enabled, which allows Data Guard to recover redo data
from the current standby redo log as it is being filled by the RFS
process. This facility of real time apply is a new feature
introduced in Oracle database 10g.
It has the benefit of quicker switchover,
instantly updating results after a physical Oracle instance
is
changed to read-only with up-to-date reporting from a logical
standby database.
The ALTER DATABASE statement can be used to
enable the real-time apply feature. For example, in physical standby
databases, issue the statement,
ALTER DATABASE RECOVER MANAGED Oracle instance
USING CURRENT LOGFILE;
For logical standby databases, issue the
statement,
ALTER DATABASE START LOGICAL STANDBY APPLY
IMMEDIATE;
To determine if real time apply is enabled, the
recovery_mode column in the v$archive_dest_status view
can be queried. It will display MANAGED REAL TIME APPLY when real
time apply is enabled.
Real Time Apply
Data Guard Log Apply
Services can automatically apply information from redo logs to standby
databases, keeping data synchronized with the primary database. In
general, log apply services wait for the full archived redo log to
arrive to the standby database host before applying to the standby
database.
Redo data is received by
the remote file server process (RFS) on the standby system, where the
RFS process writes the redo data to either archived redo logs or
optionally to a standby redo log. However, if you use a standby redo
log, you can optionally enable real time apply, which allows Data
Guard to recover redo data from the current standby redo log as it is
being filled by the RFS process. This facility of real time apply is a
new feature introduced in Oracle database 10g.
It has the benefit of
quicker switchover, instantly updating results after you change a
physical standby database to read-only with up-to-date reporting from
a logical standby database.
You can use the ALTER
DATABASE statement to enable the real-time apply feature. For example:
For physical standby
databases, issue the statement,
ALTER DATABASE RECOVER
MANAGED STANDBY DATABASE USING CURRENT LOGFILE;
For logical standby
databases, issue the statement,
ALTER DATABASE START
LOGICAL STANDBY APPLY IMMEDIATE;
To determine if real time
apply is enabled, you can query the recovery_mode column in the
v$archive_dest_status view. It will display MANAGED REAL TIME APPLY
when real time apply is enabled.
If you define a delay on a
destination (with the DELAY attribute) and use Real Time Apply, the
delay is ignored.
When, for any reason, the
apply service is unable to keep up, the apply service will
automatically go to the archive log files as needed. It will also try
to catch up and go back to reading the current standby redo log file
as soon as possible.
|