 |
|
Data Guard Log Management Tips
Oracle Database Tips by Donald BurlesonDecember 9, 2015
|
Oracle Data Guard - Log Management Services
The log management service is an integral part
of Data Guard architecture. It is comprised of two components: Log
Transport service and Log Apply service. The concept of Log
Transport and Log Apply services are similar for a physical and
logical standby database; however, there are differences at the
detailed level of the working of log management for these two types
of standby databases.
The processes involved and the architectural
details of log transport and log apply services were provided in
Chapter 2, "Data Guard Architecture". This chapter will mainly focus
on the characteristics of these two services, influence of log
transport service on the disaster recovery policies, and the
implementation of various protection modes in Data Guard
configuration.
In addition, it will briefly introduce the
protection modes available in Release 1 of Oracle9i database for the
benefit of a DBA running databases on Oracle9i Release 1.
Log Management Services
- Log Transport
Services
The log transport service is responsible for
the successful transmission of redo data from the primary database
to a Oracle instance
over Oracle Net. In brief, the log transport
service involves the log writer (LGWR) or archiver (ARCH or ARCn)
process on the primary database site and the Remote File Server (RFS)
on the Oracle instance
for transmission of data changes on the
primary database in the form of redo records.
The choice of log writer or archiver on the
primary database as the log transfer agent depends on the data
protection mode. The Oracle instance
should be started and mounted
in order for the log transport service to deliver archived redo log
files to it. The DBA can opt to send either a complete archived redo
log file or individual redo entries as these are generated on the
primary database. For the latter, standby redo logs will have to be
created on the standby site. The details on the method and form of
redo transmission will be described in detail later in this chapter.
The log destination can be a physical standby
database, a logical Oracle instance
or an archive log repository
without any database files. The archive log destination without an
underlying database is used as an alternate repository for archived
logs from the primary database.
In some configurations, a common archive log
repository can be set up to cater to more than one Oracle instance
as shown in Figure 5.1. In this scenario, the common archival
destination receives archived redo logs from the primary database
and transmits them to standby sites using Oracle Net. This setup can
be very useful if the standby databases are remotely located over
WAN, and the DBA does not want to put the performance of the primary
database at risk while transferring archived redo logs.
Log Management Services
- Log Transport
Services
Figure 5.1 - Log Archival to a common
archive destination
Data Guard Log Apply Services
The other part of log management is the log
apply service. The log apply service reads archived log files from
the directory specified by the standby_archive_dest
initialization parameter and in the format specified by the
log_archive_format parameter. The concept of log application is
very different between the two types of standby databases.
On the physical standby database, the log apply
service uses the block-per-block media recovery method to apply the
changes. The logical Oracle instance
utilizes the concept of
LogMiner technology introduced in Oracle8i to convert the redo data
into SQL statements and then applies those to the Oracle instance
using SQL Apply operation. In the following section, the log apply
services on physical and logical standby databases will be detailed.
Physical Standby Database
On the physical standby database, the log apply
service reads and applies redo logs when the database is in managed
recovery mode. In this mode, a process called the Managed Recovery
Process (MRP), which takes care of the complete recovery process, is
initiated by the database. The MRP can be started using the
following statement:
ALTER DATABASE RECOVER MANAGED Oracle instance
DISCONNECT FROM SESSION;
The RECOVER MANAGED Oracle instance
statement
was presented, in detail, in Chapter 3, Oracle instance
Administration.
Start Logical Oracle instance apply tips
|