log files tips
Oracle Tips by Burleson Consulting
In Data Guard, why do we need standby redo log files? Should
the the primary redo log files be enough?
A standby redo log resides on
the standby database site. The standby redo log file is
similar to an online redo log, except that a standby redo log is
used to store redo data that has been received from a primary
Oracle Data Guard used to have
the onerous problem of loosing the last redo log. If the primary instanced
crashed, the "current" redo log (as written by the LGWR process) would need to
be flushed (with a log switch) before the most recent changes could be applied
to the standby database. If you could not flush the current redo, data
could be lost forever.
Also see these important notes on
LNS log transport waits.
Standby Redo Logs
In Oracle 10g and beyond we see
an exciting new approach to Data Guard management whereby we write the current
redo log to a "standby redo log", allowing complete recovery in cases of
catastrophic instance failure.
Note: The standby redo
logs are populated with redo information as fast as the primary redo logs,
rather than waiting for the redo log to be archived and shipped to the
standby database. This means that the standby redo log has more current
information than the log apply mechanism because it took a "shortcut" and
was written to the standby, bypassing the traditional archiving and FTP to
the standby database.
The Oracle documentation notes three
Data Guard Protection Modes. The Maximum protection mode offers redo
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
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
Asynchronous redo transmission
We see more about the standby
redo log mode in the 10g r2 docs where a new feature called "Asynchronous
Redo Transmission" uses a new background process called LNSn:
transmission using the log writer process (LGWR ASYNC) has been improved to
reduce the performance impact on the primary database. During asynchronous
redo transmission, the network server (LNSn) process transmits redo data out
of the online redo log files on the primary database and no longer interacts
directly with the log writer process.
This change in behavior allows the log writer process to write redo data to
the current online redo log file and continue processing the next request
without waiting for inter-process communication or network I/O to complete.
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.